Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 314 for comparator (0.11 sec)

  1. 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)
  2. 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)
  3. 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)
  4. android/guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

        assertEquals(
            Collections.reverseOrder(), ((ImmutableSortedSet<Integer>) multimap.get("a")).comparator());
        assertTrue(multimap.get("x") instanceof ImmutableSortedSet);
        assertEquals(
            Collections.reverseOrder(), ((ImmutableSortedSet<Integer>) multimap.get("x")).comparator());
        assertTrue(multimap.asMap().get("a") instanceof ImmutableSortedSet);
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  5. 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)
  6. android/guava/src/com/google/common/collect/FluentIterable.java

       * FluentIterable} in the order specified by {@code comparator}. To produce an {@code
       * ImmutableList} sorted by its natural ordering, use {@code toSortedList(Ordering.natural())}.
       *
       * <p><b>{@code Stream} equivalent:</b> {@code
       * ImmutableList.copyOf(stream.sorted(comparator).iterator())}, or pass {@link
       * ImmutableList#toImmutableList} to {@code stream.sorted(comparator).collect()}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/CharsTest.java

                new char[] {GREATEST, GREATEST, GREATEST});
    
        Comparator<char[]> comparator = Chars.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
      public void testLexicographicalComparatorSerializable() {
        Comparator<char[]> comparator = Chars.lexicographicalComparator();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

      }
    
      public void testCreation_arrayOfArray() {
        Comparator<String[]> comparator =
            Ordering.natural().lexicographical().onResultOf(Arrays::asList);
        String[] array = new String[] {"a"};
        Multiset<String[]> multiset = ImmutableSortedMultiset.orderedBy(comparator).add(array).build();
        Multiset<String[]> expected = HashMultiset.create();
        expected.add(array);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/TestsForMapsInJavaUtil.java

        }
        return map;
      }
    
      static <T> Comparator<T> arbitraryNullFriendlyComparator() {
        return new NullFriendlyComparator<>();
      }
    
      private static final class NullFriendlyComparator<T> implements Comparator<T>, Serializable {
        @Override
        public int compare(T left, T right) {
          return String.valueOf(left).compareTo(String.valueOf(right));
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/SortedSetMultimapAsMapTester.java

          assertEquals(multimap().valueComparator(), valueSet.comparator());
        }
      }
    
      public void testAsMapGetImplementsSortedSet() {
        for (K key : multimap().keySet()) {
          SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key);
          assertEquals(multimap().valueComparator(), valueSet.comparator());
        }
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top