Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for trueFirst (0.08 sec)

  1. android/guava/src/com/google/common/primitives/Booleans.java

       *
       * <p>This is particularly useful in Java 8+ in combination with {@code Comparator.comparing},
       * e.g. {@code Comparator.comparing(Foo::hasBar, trueFirst())}.
       *
       * @since 21.0
       */
      public static Comparator<Boolean> trueFirst() {
        return BooleanComparator.TRUE_FIRST;
      }
    
      /**
       * Returns a {@code Comparator<Boolean>} that sorts {@code false} before {@code true}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  2. guava/src/com/google/common/primitives/Booleans.java

       *
       * <p>This is particularly useful in Java 8+ in combination with {@code Comparator.comparing},
       * e.g. {@code Comparator.comparing(Foo::hasBar, trueFirst())}.
       *
       * @since 21.0
       */
      public static Comparator<Boolean> trueFirst() {
        return BooleanComparator.TRUE_FIRST;
      }
    
      /**
       * Returns a {@code Comparator<Boolean>} that sorts {@code false} before {@code true}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ComparisonChainTest.java

        Bar(boolean isBaz) {
          this.isBaz = isBaz;
        }
    
        boolean isBaz() {
          return isBaz;
        }
      }
    
      /**
       * Validates that {@link Booleans#trueFirst()} and {@link Booleans#falseFirst()} can be used with
       * {@link Comparator} when replacing {@link ComparisonChain#compareTrueFirst} and {@link
       * ComparisonChain#compareFalseFirst}, as we document.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 13:27:08 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/BooleansTest.java

      }
    
      public void testTrueFirst() {
        assertThat(Booleans.trueFirst().compare(true, true)).isEqualTo(0);
        assertThat(Booleans.trueFirst().compare(false, false)).isEqualTo(0);
        assertThat(Booleans.trueFirst().compare(true, false)).isLessThan(0);
        assertThat(Booleans.trueFirst().compare(false, true)).isGreaterThan(0);
      }
    
      public void testFalseFirst() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 24.8K bytes
    - Viewed (0)
Back to top