Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for trueFirst (0.27 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 20.5K 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 20.5K 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:05:13 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ComparisonChain.java

       * <i>if</i> the result of this comparison chain has not already been determined.
       *
       * <p>Java 8+ users: you can get the equivalent from {@link Booleans#trueFirst()}. For example:
       *
       * <pre>
       * Comparator.comparing(Foo::isBar, {@link Booleans#trueFirst()})
       * </pre>
       *
       * @since 12.0
       */
      public abstract ComparisonChain compareTrueFirst(boolean left, boolean right);
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  5. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
Back to top