Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 224 for comparators (0.09 sec)

  1. guava-tests/test/com/google/common/collect/TreeMultisetTest.java

        assertEquals("a", elementSet.last());
        assertEquals(comparator, elementSet.comparator());
      }
    
      public void testNullAcceptingComparator() throws Exception {
        Comparator<@Nullable String> comparator = Ordering.<String>natural().<String>nullsFirst();
        TreeMultiset<@Nullable String> ms = TreeMultiset.create(comparator);
    
        ms.add("b");
        ms.add(null);
        ms.add("a");
        ms.add("b");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        Ordering<@Nullable Object> comparator = Ordering.allEqual();
        assertSame(comparator, comparator.reverse());
    
        assertEquals(0, comparator.compare(null, null));
        assertEquals(0, comparator.compare(new Object(), new Object()));
        assertEquals(0, comparator.compare("apples", "oranges"));
        assertSame(comparator, reserialize(comparator));
        assertEquals("Ordering.allEqual()", comparator.toString());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/OrderingTest.java

        Ordering<@Nullable Object> comparator = Ordering.allEqual();
        assertSame(comparator, comparator.reverse());
    
        assertEquals(0, comparator.compare(null, null));
        assertEquals(0, comparator.compare(new Object(), new Object()));
        assertEquals(0, comparator.compare("apples", "oranges"));
        assertSame(comparator, reserialize(comparator));
        assertEquals("Ordering.allEqual()", comparator.toString());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

     * returned.
     *
     * <p>All default instances returned by {@link #get} are generics-safe. Clients won't get type
     * errors for using {@code get(Comparator.class)} as a {@code Comparator<Foo>}, for example.
     * Immutable empty instances are returned for collection types; {@code ""} for string; {@code 0} for
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java

        @Override
        protected List<String> create(String[] elements) {
          Comparator<String> comparator = createExplicitComparator(elements);
          ImmutableSet<String> set = ImmutableSortedSet.copyOf(comparator, asList(elements));
          return set.asList();
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableSortedSet.java

        return unsafeComparator.compare(a, b);
      }
    
      final transient Comparator<? super E> comparator;
    
      ImmutableSortedSet(Comparator<? super E> comparator) {
        this.comparator = comparator;
      }
    
      /**
       * Returns the comparator that orders the elements, which is {@link Ordering#natural()} when the
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/GeneralRange.java

          Comparator<? super T> comparator, @ParametricNullness T endpoint, BoundType boundType) {
        return new GeneralRange<>(comparator, true, endpoint, boundType, false, null, OPEN);
      }
    
      /**
       * Returns everything below the endpoint relative to the specified comparator, with the specified
       * endpoint behavior.
       */
      static <T extends @Nullable Object> GeneralRange<T> upTo(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/graph/ElementOrder.java

       *   <li>SORTED: ordering according to a supplied comparator is guaranteed.
       * </ul>
       */
      public enum Type {
        UNORDERED,
        STABLE,
        INSERTION,
        SORTED
      }
    
      private ElementOrder(Type type, @CheckForNull Comparator<T> comparator) {
        this.type = checkNotNull(type);
        this.comparator = comparator;
        checkState((type == Type.SORTED) == (comparator != null));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/graph/ElementOrder.java

       *   <li>SORTED: ordering according to a supplied comparator is guaranteed.
       * </ul>
       */
      public enum Type {
        UNORDERED,
        STABLE,
        INSERTION,
        SORTED
      }
    
      private ElementOrder(Type type, @CheckForNull Comparator<T> comparator) {
        this.type = checkNotNull(type);
        this.comparator = comparator;
        checkState((type == Type.SORTED) == (comparator != null));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ComparatorOrdering.java

        this.comparator = checkNotNull(comparator);
      }
    
      @Override
      public int compare(@ParametricNullness T a, @ParametricNullness T b) {
        return comparator.compare(a, b);
      }
    
      @Override
      public boolean equals(@CheckForNull Object object) {
        if (object == this) {
          return true;
        }
        if (object instanceof ComparatorOrdering) {
          ComparatorOrdering<?> that = (ComparatorOrdering<?>) object;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun Jun 20 14:22:42 UTC 2021
    - 1.9K bytes
    - Viewed (0)
Back to top