Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 241 - 250 of 417 for ToArray (0.44 seconds)

  1. guava-testlib/src/com/google/common/collect/testing/testers/MapEqualsTester.java

      public void testEquals_containingNullKey() {
        Collection<Entry<K, V>> entries = getSampleEntries(getNumEntries() - 1);
        entries.add(entry(null, v3()));
    
        resetContainer(getSubjectGenerator().create(entries.toArray()));
        assertTrue(
            "A Map should equal any other Map containing the same entries,"
                + " even if some keys are null.",
            getMap().equals(newHashMap(entries)));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Nov 14 23:40:07 GMT 2024
    - 4.9K bytes
    - Click Count (0)
  2. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnsh/ShellCommandRegistryHolder.java

            requireNonNull(commandRegistry, "commandRegistry");
            this.commandRegistries.add(commandRegistry);
        }
    
        public CommandRegistry[] getCommandRegistries() {
            return commandRegistries.toArray(new CommandRegistry[0]);
        }
    
        @Override
        public void close() throws Exception {
            ArrayList<Exception> exceptions = new ArrayList<>();
            for (CommandRegistry commandRegistry : commandRegistries) {
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Tue Dec 17 09:50:45 GMT 2024
    - 2.2K bytes
    - Click Count (0)
  3. android/guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java

          }
        }
        return sum;
      }
    
      @Benchmark
      int arrayListToArrayFor(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (Object value : arrayList.toArray()) {
            sum += value.hashCode();
          }
        }
        return sum;
      }
    
      @Benchmark
      int linkedListFor(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 3.5K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

         */
        Interface a = new Impl();
        Interface b = new Impl();
        ImmutableSortedSet<Interface> set = ImmutableSortedSet.of(a, b);
        Object[] unused1 = set.toArray();
        Object[] unused2 = set.toArray(new Object[2]);
      }
    
      interface Interface extends Comparable<Interface> {}
    
      static class Impl implements Interface {
        static int nextId;
        Integer id = nextId++;
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 47.2K bytes
    - Click Count (0)
  5. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvn/MavenInvokerTestSupport.java

                    }
    
                    // dump things out
                    System.out.println("===================================================");
                    System.out.println("args: " + Arrays.toString(mvnArgs.toArray()));
                    System.out.println("===================================================");
                    System.out.println("stdout: " + stdout);
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Tue Oct 21 12:17:55 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  6. guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java

          char[] chars = Chars.toArray(asList(elements));
          return charactersOf(String.copyValueOf(chars));
        }
      }
    
      public static class CharactersOfCharSequenceGenerator extends TestCharacterListGenerator {
        @Override
        public List<Character> create(Character[] elements) {
          char[] chars = Chars.toArray(asList(elements));
          StringBuilder str = new StringBuilder();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  7. guava-testlib/src/com/google/common/collect/testing/DerivedCollectionGenerators.java

          int i = 0;
          for (Entry<K, V> entry : originalEntries) {
            entries.add(mapEntry(keysArray[i++], entry.getValue()));
          }
    
          return mapGenerator.create(entries.toArray()).keySet();
        }
    
        @Override
        public K[] createArray(int length) {
          // TODO: with appropriate refactoring of OneSizeGenerator, we can perhaps
          // tidy this up and get rid of the casts here and in
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 30 16:59:10 GMT 2025
    - 18.2K bytes
    - Click Count (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/MapEqualsTester.java

      public void testEquals_containingNullKey() {
        Collection<Entry<K, V>> entries = getSampleEntries(getNumEntries() - 1);
        entries.add(entry(null, v3()));
    
        resetContainer(getSubjectGenerator().create(entries.toArray()));
        assertTrue(
            "A Map should equal any other Map containing the same entries,"
                + " even if some keys are null.",
            getMap().equals(newHashMap(entries)));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Nov 14 23:40:07 GMT 2024
    - 4.9K bytes
    - Click Count (0)
  9. src/main/java/org/codelibs/fess/helper/SystemHelper.java

         */
        @SuppressWarnings("unchecked")
        public Pair<String, String>[] getDesignJspFileNames() {
            return designJspFileNameMap.entrySet().stream().map(e -> new Pair<>(e.getKey(), e.getValue())).toArray(n -> new Pair[n]);
        }
    
        /**
         * Refreshes the design JSP files for all virtual hosts.
         *
         * @return A list of paths to the refreshed files.
         */
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 28 06:59:19 GMT 2026
    - 43.2K bytes
    - Click Count (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java

        List<E> setContents = new ArrayList<>();
        for (E e : contents) {
          if (!setContents.contains(e)) {
            setContents.add(e);
          }
        }
        return new MinimalSet<>(type, setContents.toArray(emptyArrayForContents));
      }
    
      private MinimalSet(Class<? super @NonNull E> type, E... contents) {
        super(type, true, contents);
      }
    
      /*
       * equals() and hashCode() are more specific in the Set contract.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 2.8K bytes
    - Click Count (0)
Back to Top