Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 171 - 180 of 261 for comparators (2.25 seconds)

  1. guava/src/com/google/common/collect/ForwardingNavigableMap.java

     * invoke methods, they invoke methods on the {@code ForwardingNavigableMap}.
     *
     * <p>Each of the {@code standard} methods uses the map's comparator (or the natural ordering of the
     * elements, if there is no comparator) to test element equality. As a result, if the comparator is
     * not consistent with equals, some of the standard implementations may violate the {@code Map}
     * contract.
     *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 14.3K bytes
    - Click Count (0)
  2. android/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);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 19.6K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/collect/MapsTest.java

            .inOrder();
        assertThat(map.values()).containsExactly(2, 1).inOrder();
        assertThat(map.comparator()).isNull();
      }
    
      public void testTreeMapWithComparator() {
        TreeMap<Integer, Integer> map = Maps.newTreeMap(SOME_COMPARATOR);
        assertEquals(emptyMap(), map);
        assertThat(map.comparator()).isEqualTo(SOME_COMPARATOR);
      }
    
      public void testTreeMapWithInitialMap() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 63.2K bytes
    - Click Count (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableBiMap.java

     */
    
    package com.google.common.collect;
    
    import static com.google.common.collect.CollectPreconditions.checkEntryNotNull;
    
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.util.Comparator;
    import java.util.Map;
    import java.util.Map.Entry;
    import java.util.function.Function;
    import java.util.stream.Collector;
    import org.jspecify.annotations.Nullable;
    
    /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Aug 06 18:32:41 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/collect/ForwardingSortedSetMultimap.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.Comparator;
    import java.util.SortedSet;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A sorted set multimap which forwards all its method calls to another sorted set multimap.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 2.2K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/collect/ContiguousSet.java

      }
    
      @Override
      public ContiguousSet<C> subSet(C fromElement, C toElement) {
        checkNotNull(fromElement);
        checkNotNull(toElement);
        checkArgument(comparator().compare(fromElement, toElement) <= 0);
        return subSetImpl(fromElement, true, toElement, false);
      }
    
      /**
       * @since 12.0
       */
      @GwtIncompatible // NavigableSet
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/graph/MapCacheTest.java

    package com.google.common.graph;
    
    import static com.google.common.truth.Truth.assertThat;
    
    import com.google.common.collect.Ordering;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Comparator;
    import java.util.HashMap;
    import java.util.TreeMap;
    import org.jspecify.annotations.NullUnmarked;
    import org.junit.Before;
    import org.junit.Test;
    import org.junit.runner.RunWith;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 3.2K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/collect/ImmutableBiMap.java

    import com.google.errorprone.annotations.DoNotCall;
    import java.io.InvalidObjectException;
    import java.io.ObjectInputStream;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Comparator;
    import java.util.Map;
    import java.util.function.BinaryOperator;
    import java.util.function.Function;
    import java.util.stream.Collector;
    import java.util.stream.Collectors;
    import org.jspecify.annotations.Nullable;
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 22.2K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        assertEquals(42, queue.maximumSize);
        assertThat(queue.comparator()).isEqualTo(SOME_COMPARATOR);
      }
    
      // TODO: tests that check the weird interplay between expected size,
      // maximum size, size of initial contents, default capacity...
    
      private static void checkNatural(MinMaxPriorityQueue<Integer> queue) {
        assertThat(queue.comparator()).isEqualTo(Ordering.natural());
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 36.2K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/primitives/BooleansTest.java

                new boolean[] {true, true, true});
    
        Comparator<boolean[]> comparator = Booleans.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
      public void testLexicographicalComparatorSerializable() {
        Comparator<boolean[]> comparator = Booleans.lexicographicalComparator();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 01:43:32 GMT 2026
    - 25.3K bytes
    - Click Count (0)
Back to Top