Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 91 for SortedSet (0.12 sec)

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

       * @since 14.0
       */
      public static <C extends Comparable<?>> Range<C> encloseAll(Iterable<C> values) {
        checkNotNull(values);
        if (values instanceof SortedSet) {
          SortedSet<C> set = (SortedSet<C>) values;
          Comparator<?> comparator = set.comparator();
          if (Ordering.<C>natural().equals(comparator) || comparator == null) {
            return closed(set.first(), set.last());
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Maps.java

          return (SortedMap<K, V>) unfiltered;
        }
    
        @Override
        public SortedSet<K> keySet() {
          return (SortedSet<K>) super.keySet();
        }
    
        @Override
        SortedSet<K> createKeySet() {
          return new SortedKeySet();
        }
    
        @WeakOuter
        class SortedKeySet extends KeySet implements SortedSet<K> {
          @Override
          @CheckForNull
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 161.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Maps.java

          return (SortedMap<K, V>) unfiltered;
        }
    
        @Override
        public SortedSet<K> keySet() {
          return (SortedSet<K>) super.keySet();
        }
    
        @Override
        SortedSet<K> createKeySet() {
          return new SortedKeySet();
        }
    
        @WeakOuter
        class SortedKeySet extends KeySet implements SortedSet<K> {
          @Override
          @CheckForNull
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 167.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/MultimapBuilder.java

      private static final class TreeSetSupplier<V extends @Nullable Object>
          implements Supplier<SortedSet<V>>, Serializable {
        private final Comparator<? super V> comparator;
    
        TreeSetSupplier(Comparator<? super V> comparator) {
          this.comparator = checkNotNull(comparator);
        }
    
        @Override
        public SortedSet<V> get() {
          return new TreeSet<>(comparator);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

    import com.google.common.testing.SerializableTester;
    import java.util.Collection;
    import java.util.Comparator;
    import java.util.Iterator;
    import java.util.Map.Entry;
    import java.util.SortedSet;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit tests for {@code TreeMultimap} with explicit comparators.
     *
     * @author Jared Levy
     */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        assertThrows(NoSuchElementException.class, () -> Iterables.getLast(list));
      }
    
      public void testGetLast_sortedSet() {
        SortedSet<String> sortedSet = ImmutableSortedSet.of("b", "c", "a");
        assertEquals("c", Iterables.getLast(sortedSet));
      }
    
      public void testGetLast_withDefault_singleton() {
        Iterable<String> iterable = singletonList("foo");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/FluentIterable.java

         * to know they are SortedSets and probably would not call this method.
         */
        if (iterable instanceof SortedSet) {
          SortedSet<E> sortedSet = (SortedSet<E>) iterable;
          return Optional.of(sortedSet.last());
        }
    
        while (true) {
          E current = iterator.next();
          if (!iterator.hasNext()) {
            return Optional.of(current);
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java

          }
        } else {
          for (int i = 0; i < reps; i++) {
            dummy += ORDERING.immutableSortedCopy(input).get(0);
          }
        }
        return dummy;
      }
    
      @Benchmark
      int sortedSet(int reps) {
        int dummy = 0;
        if (mutable) {
          for (int i = 0; i < reps; i++) {
            dummy += new TreeSet<Integer>(input).first();
          }
        } else {
          for (int i = 0; i < reps; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

    import java.util.Iterator;
    import java.util.List;
    import java.util.Map.Entry;
    import java.util.NavigableMap;
    import java.util.NavigableSet;
    import java.util.Set;
    import java.util.SortedMap;
    import java.util.SortedSet;
    import junit.framework.Test;
    import junit.framework.TestCase;
    import junit.framework.TestSuite;
    
    /**
     * Unit tests for {@code TreeMultimap} with natural ordering.
     *
     * @author Jared Levy
     */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

    import java.util.Map;
    import java.util.NavigableMap;
    import java.util.NavigableSet;
    import java.util.Queue;
    import java.util.Random;
    import java.util.Set;
    import java.util.SortedMap;
    import java.util.SortedSet;
    import java.util.UUID;
    import java.util.concurrent.BlockingDeque;
    import java.util.concurrent.BlockingQueue;
    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.ConcurrentMap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
Back to top