Class Check.Comparables

java.lang.Object
atlantafx.validation.Check.Comparables
Enclosing class:
Check<T extends @Nullable Object>

public static final class Check.Comparables extends Object
  • Method Details

    • isEqual

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> isEqual(@Nullable T other)
      Checks if a value is equal to another value, by Comparable.compareTo(T), not by Object.equals(Object).
    • isNotEqual

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> isNotEqual(@Nullable T other)
      Checks if a value is not equal to another value, by Comparable.compareTo(T), not by Object.equals(Object).
    • inside

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> inside(@Nullable T min, @Nullable T max)
      Checks if a value is strictly between a lower and an upper bound.
      Parameters:
      min - the lower bound (inclusive)
      max - the upper bound (exclusive)
      Returns:
      true if the value is greater than min and less than max
    • between

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> between(@Nullable T min, @Nullable T max)
      Checks if a value is within a lower and an upper bound (inclusive).
      Parameters:
      min - the lower bound (inclusive)
      max - the upper bound (inclusive)
      Returns:
      true if the value is greater than or equal to min and less than or equal to max
    • greaterThan

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> greaterThan(@Nullable T min)
      Checks if a value is strictly greater than a minimum boundary.
    • greaterOrEqual

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> greaterOrEqual(@Nullable T min)
      Checks if a value is greater than or equal to a minimum boundary.
    • lessThan

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> lessThan(@Nullable T max)
      Checks if a value is strictly less than a maximum boundary.
    • lessOrEqual

      public static <T extends Comparable<? super T>> Predicate<@Nullable T> lessOrEqual(@Nullable T max)
      Checks if a value is less than or equal to a maximum boundary.