Class Join<T>

  • Type Parameters:
    T - the type of object this condition accepts.
    All Implemented Interfaces:
    Descriptable<Condition<T>>
    Direct Known Subclasses:
    AllOf, AnyOf

    public abstract class Join<T>
    extends Condition<T>
    Join of two or more Conditions.
    Author:
    Yvonne Wang, Mikhail Mazursky
    • Method Detail

      • checkNotNullConditions

        private static <T> T checkNotNullConditions​(T conditions)
      • descriptionPrefix

        public abstract String descriptionPrefix()
        method used to prefix the subclass join description, ex: "all of"
        Returns:
        the prefix to use to build the description.
      • calculateDescription

        private void calculateDescription()
        method used to calculate the the subclass join description
      • description

        public Description description()
        Description copied from class: Condition
        Returns the description of this condition.
        Overrides:
        description in class Condition<T>
        Returns:
        the description of this condition.
      • conditionDescriptionWithStatus

        public Description conditionDescriptionWithStatus​(T actual)
        Description copied from class: Condition
        Returns the description of this condition with its status failed or success.
        Overrides:
        conditionDescriptionWithStatus in class Condition<T>
        Parameters:
        actual - the instance to evaluate the condition status against.
        Returns:
        the description of this condition with its status.
      • notNull

        private static <T> T notNull​(T condition)
      • conditions

        public final Collection<Condition<? super T>> conditions()
        Returns the conditions to join.
        Returns:
        the conditions to join.