Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 205 for comparable (0.08 sec)

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

        }
      }
    
      // J2kt cannot translate the Comparable rawtype in a usable way (it becomes Comparable<Object>
      // but types are typically only Comparable to themselves).
      @SuppressWarnings({"rawtypes", "unchecked"})
      private static MinMaxPriorityQueue.Builder<Comparable<?>> rawtypeToWildcard(
          MinMaxPriorityQueue.Builder<Comparable> builder) {
        return (MinMaxPriorityQueue.Builder) builder;
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 36K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java

    import java.util.SortedSet;
    import java.util.TreeSet;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A wrapper around {@code TreeSet} that aggressively checks to see if elements are mutually
     * comparable. This implementation passes the navigable set test suites.
     *
     * @author Louis Wasserman
     */
    @GwtIncompatible
    public final class SafeTreeSet<E> implements Serializable, NavigableSet<E> {
      @SuppressWarnings("unchecked")
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

        return set;
      }
    
      private Element newElement() {
        int value = random.nextInt();
        return isUserTypeFast ? new Element(value) : new SlowElement(value);
      }
    
      static class Element implements Comparable<Element> {
        final int hash;
    
        Element(int hash) {
          this.hash = hash;
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/collect/ComparatorDelegationOverheadBenchmark.java

    /**
     * A benchmark to determine the overhead of sorting with {@link Ordering#from(Comparator)}, or with
     * {@link Ordering#natural()}, as opposed to using the inlined {@link Arrays#sort(Object[])}
     * implementation, which uses {@link Comparable#compareTo} directly.
     *
     * @author Louis Wasserman
     */
    @NullUnmarked
    public class ComparatorDelegationOverheadBenchmark {
      private final Integer[][] inputArrays = new Integer[0x100][];
    
      @Param({"10000"})
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java

    import java.util.Set;
    import java.util.SortedMap;
    import java.util.TreeMap;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A wrapper around {@code TreeMap} that aggressively checks to see if keys are mutually comparable.
     * This implementation passes the navigable map test suites.
     *
     * @author Louis Wasserman
     */
    @GwtIncompatible
    public final class SafeTreeMap<K, V> implements Serializable, NavigableMap<K, V> {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java

    import org.jspecify.annotations.Nullable;
    
    /**
     * An unhashable object to be used in testing as values in our collections.
     *
     * @author Regina O'Dell
     */
    @GwtCompatible
    public class UnhashableObject implements Comparable<UnhashableObject> {
      private final int value;
    
      public UnhashableObject(int value) {
        this.value = value;
      }
    
      @Override
      public boolean equals(@Nullable Object object) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Apr 10 20:12:40 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  7. guava/src/com/google/common/math/ToDoubleRounder.java

    /**
     * Helper type to implement rounding {@code X} to a representable {@code double} value according to
     * a {@link RoundingMode}.
     */
    @GwtIncompatible
    abstract class ToDoubleRounder<X extends Number & Comparable<X>> {
      /**
       * Returns x rounded to either the greatest double less than or equal to the precise value of x,
       * or the least double greater than or equal to the precise value of x.
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java

    import org.jspecify.annotations.Nullable;
    
    /**
     * Simple base class to verify that we handle generics correctly.
     *
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    public class BaseComparable implements Comparable<BaseComparable>, Serializable {
      private final String s;
    
      public BaseComparable(String s) {
        this.s = s;
      }
    
      @Override
      public int hashCode() { // delegate to 's'
        return s.hashCode();
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/Base.java

    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /** Simple base class to verify that we handle generics correctly. */
    @GwtCompatible
    @NullUnmarked
    class Base implements Comparable<Base>, Serializable {
      private final String s;
    
      public Base(String s) {
        this.s = s;
      }
    
      @Override
      public int hashCode() { // delegate to 's'
        return s.hashCode();
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/AbstractRangeSetTest.java

      public static void testInvariants(RangeSet<?> rangeSet) {
        testInvariantsInternal(rangeSet);
        testInvariantsInternal(rangeSet.complement());
      }
    
      private static <C extends Comparable<?>> void testInvariantsInternal(RangeSet<C> rangeSet) {
        assertEquals(rangeSet.asRanges().isEmpty(), rangeSet.isEmpty());
        assertEquals(rangeSet.asDescendingSetOfRanges().isEmpty(), rangeSet.isEmpty());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 2.7K bytes
    - Viewed (0)
Back to top