Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 219 for Comparator (0.1 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/DerivedCollectionGenerators.java

        final E lastInclusive;
        private final Comparator<? super E> comparator;
        private final TestSortedSetGenerator<E> delegate;
    
        public SortedSetSubsetTestSetGenerator(
            TestSortedSetGenerator<E> delegate, Bound to, Bound from) {
          this.to = to;
          this.from = from;
          this.delegate = delegate;
    
          SortedSet<E> emptySet = delegate.create();
          this.comparator = emptySet.comparator();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CompoundOrdering.java

      final Comparator<? super T>[] comparators;
    
      @SuppressWarnings("unchecked") // Generic array creation
      CompoundOrdering(Comparator<? super T> primary, Comparator<? super T> secondary) {
        this.comparators = (Comparator<? super T>[]) new Comparator<?>[] {primary, secondary};
      }
    
      @SuppressWarnings("unchecked") // Generic array creation
      CompoundOrdering(Iterable<? extends Comparator<? super T>> comparators) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/TreeMultiset.java

        // reading data stored by writeObject
        Comparator<? super E> comparator = (Comparator<? super E>) requireNonNull(stream.readObject());
        Serialization.getFieldSetter(AbstractSortedMultiset.class, "comparator").set(this, comparator);
        Serialization.getFieldSetter(TreeMultiset.class, "range")
            .set(this, GeneralRange.all(comparator));
        Serialization.getFieldSetter(TreeMultiset.class, "rootReference")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       * Comparator}.
       *
       * @throws NullPointerException if {@code comparator} or any of {@code elements} is null
       */
      public static <E> ImmutableSortedMultiset<E> copyOf(
          Comparator<? super E> comparator, Iterator<? extends E> elements) {
        checkNotNull(comparator);
        return new Builder<E>(comparator).addAll(elements).build();
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/TreeMultimap.java

      }
    
      TreeMultimap(Comparator<? super K> keyComparator, Comparator<? super V> valueComparator) {
        super(new TreeMap<K, Collection<V>>(keyComparator));
        this.keyComparator = keyComparator;
        this.valueComparator = valueComparator;
      }
    
      private TreeMultimap(
          Comparator<? super K> keyComparator,
          Comparator<? super V> valueComparator,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Mar 09 00:21:17 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java

      }
    
      @Override
      public void clear() {
        delegate.clear();
      }
    
      @Override
      public Comparator<? super E> comparator() {
        Comparator<? super E> comparator = delegate.comparator();
        if (comparator == null) {
          comparator = (Comparator<? super E>) NATURAL_ORDER;
        }
        return comparator;
      }
    
      @Override
      public boolean contains(Object object) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java

      }
    
      @Override
      public void clear() {
        delegate.clear();
      }
    
      @Override
      public Comparator<? super K> comparator() {
        Comparator<? super K> comparator = delegate.comparator();
        if (comparator == null) {
          comparator = (Comparator<? super K>) NATURAL_ORDER;
        }
        return comparator;
      }
    
      @Override
      public boolean containsKey(Object key) {
        try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/TestsForSetsInJavaUtil.java

        Collections.addAll(tmp, elements);
        return tmp.toArray(new String[0]);
      }
    
      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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        Comparator<Comparable<?>> comparator = Ordering.natural().reverse();
        SortedSet<String> set =
            new ImmutableSortedSet.Builder<String>(comparator).add("a", "b", "c").build();
        SortedSet<String> copy = SerializableTester.reserializeAndAssert(set);
        assertTrue(elementsEqual(set, copy));
        assertEquals(set.comparator(), copy.comparator());
      }
    
      public void testReverseOrder() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ForwardingSortedMap.java

      @SuppressWarnings({"unchecked", "nullness"})
      static int unsafeCompare(
          @CheckForNull Comparator<?> comparator, @CheckForNull Object o1, @CheckForNull Object o2) {
        if (comparator == null) {
          return ((Comparable<@Nullable Object>) o1).compareTo(o2);
        } else {
          return ((Comparator<@Nullable Object>) comparator).compare(o1, o2);
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 5.6K bytes
    - Viewed (0)
Back to top