Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for nullsFirst (0.06 sec)

  1. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

                                .compare(
                                    left.getValue(), right.getValue(), Ordering.natural().nullsFirst())
                                .result();
                          }
                        }.sortedCopy(insertionOrder);
                      }
                    })
                .named("TreeMultimap nullsFirst")
                .withFeatures(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/SubMapMultimapAsMapImplementsMapTest.java

      }
    
      private TreeMultimap<String, Integer> createMultimap() {
        TreeMultimap<String, Integer> multimap =
            TreeMultimap.create(
                Ordering.<String>natural().nullsFirst(), Ordering.<Integer>natural().nullsFirst());
        multimap.put("a", -1);
        multimap.put("a", -3);
        multimap.put("z", -2);
        return multimap;
      }
    
      @Override
      protected Map<String, Collection<Integer>> makeEmptyMap() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Ordering.java

       *
       * <p><b>Java 8+ users:</b> Use {@code Comparator.nullsFirst(thisComparator)} instead.
       */
      // type parameter <S> lets us avoid the extra <String> in statements like:
      // Ordering<String> o = Ordering.<String>natural().nullsFirst();
      @GwtCompatible(serializable = true)
      public <S extends T> Ordering<@Nullable S> nullsFirst() {
        return new NullsFirstOrdering<S>(this);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        Ordering<@Nullable Integer> ordering = Ordering.<Integer>natural().<Integer>nullsFirst();
        Helpers.<@Nullable Integer>testComparator(ordering, null, Integer.MIN_VALUE, 0, 1);
    
        new EqualsTester()
            .addEqualityGroup(ordering, Ordering.natural().nullsFirst())
            .addEqualityGroup(numberOrdering.nullsFirst())
            .addEqualityGroup(Ordering.natural())
            .testEquals();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/OrderingTest.java

        Ordering<@Nullable Integer> ordering = Ordering.<Integer>natural().<Integer>nullsFirst();
        Helpers.<@Nullable Integer>testComparator(ordering, null, Integer.MIN_VALUE, 0, 1);
    
        new EqualsTester()
            .addEqualityGroup(ordering, Ordering.natural().nullsFirst())
            .addEqualityGroup(numberOrdering.nullsFirst())
            .addEqualityGroup(Ordering.natural())
            .testEquals();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Ordering.java

       *
       * <p><b>Java 8+ users:</b> Use {@code Comparator.nullsFirst(thisComparator)} instead.
       */
      // type parameter <S> lets us avoid the extra <String> in statements like:
      // Ordering<String> o = Ordering.<String>natural().nullsFirst();
      @GwtCompatible(serializable = true)
      public <S extends T> Ordering<@Nullable S> nullsFirst() {
        return new NullsFirstOrdering<S>(this);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  7. 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)
  8. 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/ImmutableSortedMultisetTest.java

      }
    
      public void testBuilderSetCountHandlesNullsCorrectly() {
        ImmutableSortedMultiset.Builder<String> builder =
            new ImmutableSortedMultiset.Builder<>(Ordering.natural().nullsFirst());
        assertThrows(NullPointerException.class, () -> builder.setCount(null, 2));
      }
    
      public void testBuilderSetCountIllegal() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/MultimapsTest.java

     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class MultimapsTest extends TestCase {
    
      private static final Comparator<Integer> INT_COMPARATOR =
          Ordering.<Integer>natural().reverse().nullsFirst();
    
      @SuppressWarnings("deprecation")
      public void testUnmodifiableListMultimapShortCircuit() {
        ListMultimap<String, Integer> mod = ArrayListMultimap.create();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 38.4K bytes
    - Viewed (0)
Back to top