Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for collections (0.18 sec)

  1. android/guava/src/com/google/common/collect/Iterables.java

       */
      public static boolean elementsEqual(Iterable<?> iterable1, Iterable<?> iterable2) {
        if (iterable1 instanceof Collection && iterable2 instanceof Collection) {
          Collection<?> collection1 = (Collection<?>) iterable1;
          Collection<?> collection2 = (Collection<?>) iterable2;
          if (collection1.size() != collection2.size()) {
            return false;
          }
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

      public void testToArrayEmpty() {
        Iterator<String> iterator = Collections.<String>emptyList().iterator();
        String[] array = Iterators.toArray(iterator, String.class);
        assertTrue(Arrays.equals(new String[0], array));
      }
    
      @GwtIncompatible // Iterators.toArray(Iterator, Class)
      public void testToArraySingleton() {
        Iterator<String> iterator = Collections.singletonList("a").iterator();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 56.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Multimaps.java

          Collection<V> collection) {
        if (collection instanceof SortedSet) {
          return Collections.unmodifiableSortedSet((SortedSet<V>) collection);
        } else if (collection instanceof Set) {
          return Collections.unmodifiableSet((Set<V>) collection);
        } else if (collection instanceof List) {
          return Collections.unmodifiableList((List<V>) collection);
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 86.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Comparators.java

       * For example, a lexicographical natural ordering over integers considers {@code [] < [1] < [1,
       * 1] < [1, 2] < [2]}.
       *
       * <p>Note that {@code Collections.reverseOrder(lexicographical(comparator))} is not equivalent to
       * {@code lexicographical(Collections.reverseOrder(comparator))} (consider how each would order
       * {@code [1]} and {@code [1, 1]}).
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Ordering.java

      public <E extends T> List<E> leastOf(Iterable<E> iterable, int k) {
        if (iterable instanceof Collection) {
          Collection<E> collection = (Collection<E>) iterable;
          if (collection.size() <= 2L * k) {
            // In this case, just dumping the collection to an array and sorting is
            // faster than using the implementation for Iterator, which is
            // specialized for k much smaller than n.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Sets.java

        checkNotNull(collection);
        return (collection instanceof EnumSet)
            ? EnumSet.complementOf((EnumSet<E>) collection)
            : makeComplementByHand(collection, type);
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      private static <E extends Enum<E>> EnumSet<E> makeComplementByHand(
          Collection<E> collection, Class<E> type) {
        EnumSet<E> result = EnumSet.allOf(type);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multisets.java

      static boolean removeAllImpl(Multiset<?> self, Collection<?> elementsToRemove) {
        Collection<?> collection =
            (elementsToRemove instanceof Multiset)
                ? ((Multiset<?>) elementsToRemove).elementSet()
                : elementsToRemove;
    
        return self.elementSet().removeAll(collection);
      }
    
      /** An implementation of {@link Multiset#retainAll}. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableMap.java

    import java.io.InvalidObjectException;
    import java.io.ObjectInputStream;
    import java.io.Serializable;
    import java.util.AbstractMap;
    import java.util.Arrays;
    import java.util.BitSet;
    import java.util.Collection;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Map.Entry;
    import java.util.Set;
    import java.util.SortedMap;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

    import com.google.errorprone.annotations.concurrent.LazyInit;
    import java.io.InvalidObjectException;
    import java.io.ObjectInputStream;
    import java.io.Serializable;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Iterator;
    import java.util.NavigableSet;
    import java.util.SortedSet;
    import java.util.stream.Collector;
    import javax.annotation.CheckForNull;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/FilteredEntryMultimap.java

          return satisfies(key, value);
        }
      }
    
      static <E extends @Nullable Object> Collection<E> filterCollection(
          Collection<E> collection, Predicate<? super E> predicate) {
        if (collection instanceof Set) {
          return Sets.filter((Set<E>) collection, predicate);
        } else {
          return Collections2.filter(collection, predicate);
        }
      }
    
      @Override
      public boolean containsKey(@CheckForNull Object key) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 11.9K bytes
    - Viewed (0)
Back to top