Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for nullsFirst (0.23 sec)

  1. android/guava-testlib/test/com/google/common/collect/testing/SafeTreeSetTest.java

                    new TestStringSetGenerator() {
                      @Override
                      protected Set<String> create(String[] elements) {
                        NavigableSet<String> set = new SafeTreeSet<>(Ordering.natural().nullsFirst());
                        Collections.addAll(set, elements);
                        return set;
                      }
    
                      @Override
                      public List<String> order(List<String> insertionOrder) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/GeneralRangeTest.java

     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class GeneralRangeTest extends TestCase {
      private static final Ordering<@Nullable Integer> ORDERING =
          Ordering.<Integer>natural().<Integer>nullsFirst();
    
      private static final List<@Nullable Integer> IN_ORDER_VALUES = asList(null, 1, 2, 3, 4, 5);
    
      public void testCreateEmptyRangeFails() {
        for (BoundType lboundType : BoundType.values()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java

      @Override
      protected <K, V> NavigableMap<K, V> create() {
        @SuppressWarnings("unchecked")
        NavigableMap<K, V> innermost =
            new SafeTreeMap<>((Comparator<? super K>) Ordering.natural().nullsFirst());
        TestMap<K, V> inner = new TestMap<>(innermost, mutex);
        NavigableMap<K, V> outer = Synchronized.navigableMap(inner, mutex);
        return outer;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 22:09:38 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

          SortedMap<K, V> delegate, Comparator<? super K> comparator) {
        return new ImmutableSortedMap<K, V>(delegate, comparator);
      }
    
      /*
       * We don't permit nulls, but we wrap every comparator with nullsFirst().
       * Why? We want for queries like containsKey(null) to return false, but the
       * GWT SortedMap implementation that we delegate to throws
       * NullPointerException if the comparator does. Since our construction
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/TreeMultisetTest.java

        assertEquals(comparator, elementSet.comparator());
      }
    
      public void testNullAcceptingComparator() throws Exception {
        Comparator<@Nullable String> comparator = Ordering.<String>natural().<String>nullsFirst();
        TreeMultiset<@Nullable String> ms = TreeMultiset.create(comparator);
    
        ms.add("b");
        ms.add(null);
        ms.add("a");
        ms.add("b");
        ms.add(null, 2);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/GeneralRangeTest.java

     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class GeneralRangeTest extends TestCase {
      private static final Ordering<@Nullable Integer> ORDERING =
          Ordering.<Integer>natural().<Integer>nullsFirst();
    
      private static final List<@Nullable Integer> IN_ORDER_VALUES = asList(null, 1, 2, 3, 4, 5);
    
      public void testCreateEmptyRangeFails() {
        for (BoundType lboundType : BoundType.values()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

      }
    
      /** Decreasing integer values. A {@code null} comes before any non-null value. */
      private static final Comparator<@Nullable Integer> DECREASING_INT_COMPARATOR =
          Ordering.<Integer>natural().reverse().<Integer>nullsFirst();
    
      private SetMultimap<String, Integer> create() {
        return TreeMultimap.create(StringLength.COMPARATOR, DECREASING_INT_COMPARATOR);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

       */
      private @interface GwtTransient {}
    
      /**
       * Compares strings in natural order except that null comes immediately before a given value. This
       * works better than Ordering.natural().nullsFirst() because, if null comes before all other
       * values, it lies outside the submap/submultiset ranges we test, and the variety of tests that
       * exercise null handling fail on those subcollections.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/TreeMultisetTest.java

        assertEquals(comparator, elementSet.comparator());
      }
    
      public void testNullAcceptingComparator() throws Exception {
        Comparator<@Nullable String> comparator = Ordering.<String>natural().<String>nullsFirst();
        TreeMultiset<@Nullable String> ms = TreeMultiset.create(comparator);
    
        ms.add("b");
        ms.add(null);
        ms.add("a");
        ms.add("b");
        ms.add(null, 2);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/Helpers.java

       */
      private @interface GwtTransient {}
    
      /**
       * Compares strings in natural order except that null comes immediately before a given value. This
       * works better than Ordering.natural().nullsFirst() because, if null comes before all other
       * values, it lies outside the submap/submultiset ranges we test, and the variety of tests that
       * exercise null handling fail on those subcollections.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
Back to top