org.springframework.util.comparator

Class BooleanComparator

    • Field Detail

      • TRUE_LOW

        public static final BooleanComparator TRUE_LOW
        A shared default instance of this comparator, treating true lower than false.
      • TRUE_HIGH

        public static final BooleanComparator TRUE_HIGH
        A shared default instance of this comparator, treating true higher than false.
    • Constructor Detail

      • BooleanComparator

        public BooleanComparator(boolean trueLow)
        Create a BooleanComparator that sorts boolean values based on the provided flag.

        Alternatively, you can use the default shared instances: BooleanComparator.TRUE_LOW and BooleanComparator.TRUE_HIGH.

        Parameters:
        trueLow - whether to treat true as lower or higher than false
        See Also:
        TRUE_LOW, TRUE_HIGH