Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 219 for Comparator (0.08 sec)

  1. 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
    - 21.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Maps.java

        @LazyInit @CheckForNull private transient Comparator<? super K> comparator;
    
        @SuppressWarnings("unchecked")
        @Override
        public Comparator<? super K> comparator() {
          Comparator<? super K> result = comparator;
          if (result == null) {
            Comparator<? super K> forwardCmp = forward().comparator();
            if (forwardCmp == null) {
              forwardCmp = (Comparator) Ordering.natural();
            }
    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

        @LazyInit @CheckForNull private transient Comparator<? super K> comparator;
    
        @SuppressWarnings("unchecked")
        @Override
        public Comparator<? super K> comparator() {
          Comparator<? super K> result = comparator;
          if (result == null) {
            Comparator<? super K> forwardCmp = forward().comparator();
            if (forwardCmp == null) {
              forwardCmp = (Comparator) Ordering.natural();
            }
    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. guava-tests/benchmark/com/google/common/collect/ComparatorDelegationOverheadBenchmark.java

    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.util.Arrays;
    import java.util.Comparator;
    import java.util.Random;
    
    /**
     * 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[])}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/SignedBytes.java

       * signed.
       *
       * <p>The returned comparator is inconsistent with {@link Object#equals(Object)} (since arrays
       * support only identity equality), but it is consistent with {@link
       * java.util.Arrays#equals(byte[], byte[])}.
       *
       * @since 2.0
       */
      public static Comparator<byte[]> lexicographicalComparator() {
        return LexicographicalComparator.INSTANCE;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java

        }
    
        @Override
        public SortedMap<K, V> tailMap(K fromKey) {
          return tailMap(fromKey, true);
        }
    
        @Override
        public Comparator<? super K> comparator() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate().comparator();
        }
    
        @Override
        public K firstKey() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate().firstKey();
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 22:09:38 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/primitives/UnsignedBytesBenchmark.java

    import java.util.Arrays;
    import java.util.Comparator;
    import java.util.Random;
    
    /**
     * Microbenchmark for {@link UnsignedBytes}.
     *
     * @author Hiroshi Yamauchi
     */
    public class UnsignedBytesBenchmark {
    
      private byte[] ba1;
      private byte[] ba2;
      private byte[] ba3;
      private byte[] ba4;
      private Comparator<byte[]> javaImpl;
      private Comparator<byte[]> unsafeImpl;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ForwardingSortedMultiset.java

        /** Constructor for use by subclasses. */
        public StandardElementSet() {
          super(ForwardingSortedMultiset.this);
        }
      }
    
      @Override
      public Comparator<? super E> comparator() {
        return delegate().comparator();
      }
    
      @Override
      public SortedMultiset<E> descendingMultiset() {
        return delegate().descendingMultiset();
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableList.java

       * {@code ImmutableList}, use {@code stream.sorted(comparator).collect(toImmutableList())}.
       *
       * @throws NullPointerException if any element in the input is null
       * @since 21.0
       */
      public static <E> ImmutableList<E> sortedCopyOf(
          Comparator<? super E> comparator, Iterable<? extends E> elements) {
        checkNotNull(comparator);
        @SuppressWarnings("unchecked") // all supported methods are covariant
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/StandardRowSortedTable.java

        }
    
        @Override
        SortedSet<R> createKeySet() {
          return new Maps.SortedKeySet<>(this);
        }
    
        @Override
        @CheckForNull
        public Comparator<? super R> comparator() {
          return sortedBackingMap().comparator();
        }
    
        @Override
        public R firstKey() {
          return sortedBackingMap().firstKey();
        }
    
        @Override
        public R lastKey() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jul 15 15:41:16 UTC 2021
    - 4.3K bytes
    - Viewed (0)
Back to top