Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 82 for SortedSet (0.05 sec)

  1. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 18K bytes
    - Viewed (0)
  2. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 18K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/IterablesTest.java

        assertEquals("bar", Iterables.getLast(diesOnIteratorList, "qux"));
      }
    
      public void testGetLast_emptySortedSet() {
        SortedSet<String> sortedSet = ImmutableSortedSet.of();
        assertThrows(NoSuchElementException.class, () -> Iterables.getLast(sortedSet));
        assertEquals("c", Iterables.getLast(sortedSet, "c"));
      }
    
      public void testGetLast_iterable() {
        Set<String> set = ImmutableSet.of("a", "b", "c");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 46.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java

            ((RegularImmutableSet<Integer>) set).table.length);
      }
    
      public void testCopyOf_copiesImmutableSortedSet() {
        ImmutableSortedSet<String> sortedSet = ImmutableSortedSet.of("a");
        ImmutableSet<String> copy = ImmutableSet.copyOf(sortedSet);
        assertNotSame(sortedSet, copy);
      }
    
      // TODO(b/172823566): Use mainline testToImmutableSet once CollectorTester is usable to java7.
      public void testToImmutableSet_java7() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableSetTest.java

            ((RegularImmutableSet<Integer>) set).table.length);
      }
    
      public void testCopyOf_copiesImmutableSortedSet() {
        ImmutableSortedSet<String> sortedSet = ImmutableSortedSet.of("a");
        ImmutableSet<String> copy = ImmutableSet.copyOf(sortedSet);
        assertNotSame(sortedSet, copy);
      }
    
      public void testToImmutableSet() {
        Collector<String, ?, ImmutableSet<String>> collector = toImmutableSet();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  7. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  8. android/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.jspecify.annotations.NullMarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Unit tests for {@code TreeMultimap} with explicit comparators.
     *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/SortedSetTestSuiteBuilder.java

    import java.util.Collection;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import junit.framework.TestSuite;
    
    /**
     * Creates, based on your criteria, a JUnit test suite that exhaustively tests a SortedSet
     * implementation.
     */
    @GwtIncompatible
    public class SortedSetTestSuiteBuilder<E> extends SetTestSuiteBuilder<E> {
      public static <E> SortedSetTestSuiteBuilder<E> using(TestSortedSetGenerator<E> generator) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/SortedSetTestSuiteBuilder.java

    import java.util.Collection;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import junit.framework.TestSuite;
    
    /**
     * Creates, based on your criteria, a JUnit test suite that exhaustively tests a SortedSet
     * implementation.
     */
    @GwtIncompatible
    public class SortedSetTestSuiteBuilder<E> extends SetTestSuiteBuilder<E> {
      public static <E> SortedSetTestSuiteBuilder<E> using(TestSortedSetGenerator<E> generator) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top