Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 8,503 for copyOf (0.05 sec)

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

          extends TestStringSortedMapGenerator {
        @Override
        public SortedMap<String, String> create(Entry<String, String>[] entries) {
          return ImmutableSortedMap.copyOf(asList(entries));
        }
      }
    
      public static class ImmutableSortedMapEntryListGenerator
          implements TestListGenerator<Entry<String, Integer>> {
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CartesianList.java

        ImmutableList.Builder<List<E>> axesBuilder = new ImmutableList.Builder<>(lists.size());
        for (List<? extends E> list : lists) {
          List<E> copy = ImmutableList.copyOf(list);
          if (copy.isEmpty()) {
            return ImmutableList.of();
          }
          axesBuilder.add(copy);
        }
        return new CartesianList<>(axesBuilder.build());
      }
    
      CartesianList(ImmutableList<List<E>> axes) {
        this.axes = axes;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/hash/MessageDigestHashFunction.java

        public HashCode hash() {
          checkNotDone();
          done = true;
          return (bytes == digest.getDigestLength())
              ? HashCode.fromBytesNoCopy(digest.digest())
              : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes));
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 25 20:32:46 UTC 2022
    - 5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

              HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input));
          for (int bytes = 4; bytes <= digest.getDigestLength(); bytes++) {
            assertEquals(
                HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)),
                new MessageDigestHashFunction(algorithmName, bytes, algorithmName).hashBytes(input));
          }
          try {
            int maxSize = digest.getDigestLength();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/TestsForSetsInJavaUtil.java

                  @Override
                  public Set<AnEnum> create(AnEnum[] elements) {
                    return (elements.length == 0)
                        ? EnumSet.noneOf(AnEnum.class)
                        : EnumSet.copyOf(MinimalCollection.of(elements));
                  }
                })
            .named("EnumSet")
            .withFeatures(
                SetFeature.GENERAL_PURPOSE,
                CollectionFeature.SERIALIZABLE,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/AbstractCache.java

            K castKey = (K) key;
            V value = getIfPresent(key);
            if (value != null) {
              result.put(castKey, value);
            }
          }
        }
        return ImmutableMap.copyOf(result);
      }
    
      /** @since 11.0 */
      @Override
      public void put(K key, V value) {
        throw new UnsupportedOperationException();
      }
    
      /** @since 12.0 */
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 18:00:07 UTC 2021
    - 9.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/Futures.java

        ListenableFuture<? extends T>[] copy = gwtCompatibleToArray(futures);
        final InCompletionOrderState<T> state = new InCompletionOrderState<>(copy);
        ImmutableList.Builder<AbstractFuture<T>> delegatesBuilder =
            ImmutableList.builderWithExpectedSize(copy.length);
        for (int i = 0; i < copy.length; i++) {
          delegatesBuilder.add(new InCompletionOrderFuture<T>(state));
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/Collections2Test.java

                  public Collection<String> create(String[] elements) {
                    List<String> unfiltered = newArrayList();
                    unfiltered.add("yyy");
                    unfiltered.addAll(ImmutableList.copyOf(elements));
                    unfiltered.add("zzz");
                    return Collections2.filter(unfiltered, LENGTH_1);
                  }
                })
            .named("Collections2.filter, no nulls")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 21 10:16:44 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableTableTest.java

      }
    
      private static <R, C, V> void validateTableCopies(Table<R, C, V> original) {
        Table<R, C, V> copy = ImmutableTable.copyOf(original);
        assertEquals(original, copy);
        validateViewOrdering(original, copy);
    
        Table<R, C, V> built = ImmutableTable.<R, C, V>builder().putAll(original).build();
        assertEquals(original, built);
        validateViewOrdering(original, built);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableBiMap.java

          ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
          // TODO(lowasser): if we need to make a copy of a BiMap because the
          // forward map is a view, don't make a copy of the non-view delegate map
          if (!bimap.isPartialView()) {
            return bimap;
          }
        }
        return copyOf(map.entrySet());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.6K bytes
    - Viewed (0)
Back to top