Interface Checks<T>

  • Type Parameters:
    T - the type of the input to the predicate
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Checks<T>
    Functional interface for boolean array checks.
    Author:
    BaseX Team 2005-23, BSD License, Christian Gruen
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default boolean all​(Iterable<T> values)
      Returns true if all value checks are successful.
      default boolean all​(T[] values)
      Returns true if all value checks are successful.
      default boolean any​(Iterable<T> values)
      Returns true if at least one value check is successful.
      default boolean any​(T[] values)
      Returns true if at least one value check is successful.
      default int index​(Iterable<T> values)
      Returns the index of the first successful check.
      default int index​(T[] values)
      Returns the index of the first successful check.
      boolean ok​(T value)
      Returns the result of a check.
    • Method Detail

      • any

        default boolean any​(Iterable<T> values)
        Returns true if at least one value check is successful.
        Parameters:
        values - values to check
        Returns:
        result of check
      • all

        default boolean all​(Iterable<T> values)
        Returns true if all value checks are successful.
        Parameters:
        values - values to check
        Returns:
        result of check
      • index

        default int index​(Iterable<T> values)
        Returns the index of the first successful check.
        Parameters:
        values - values to check
        Returns:
        index, -1 otherwise
      • any

        default boolean any​(T[] values)
        Returns true if at least one value check is successful.
        Parameters:
        values - values to check
        Returns:
        result of check
      • all

        default boolean all​(T[] values)
        Returns true if all value checks are successful.
        Parameters:
        values - values to check
        Returns:
        result of check
      • index

        default int index​(T[] values)
        Returns the index of the first successful check.
        Parameters:
        values - values to check
        Returns:
        index, -1 otherwise
      • ok

        boolean ok​(T value)
        Returns the result of a check.
        Parameters:
        value - single value
        Returns:
        result of check