Class Conditions


  • public final class Conditions
    extends Object
    • Constructor Detail

      • Conditions

        public Conditions()
    • Method Detail

      • compose

        public static Condition compose​(Condition... conditions)
        Static helper method to create a Condition compose of the given ones.
        Parameters:
        conditions - the Conditions to compose.
        Returns:
        the new Condition object.
      • onPropertyExist

        public static Condition onPropertyExist​(String property)
        Specify that the given property should be set for a component to be eligible for use. .
        Parameters:
        property - the property name.
        Returns:
        the Condition object.
      • onPropertyMissing

        public static Condition onPropertyMissing​(String property)
        Specify that the given property should be missing for a component to be eligible for use.
        Parameters:
        property - the property name.
        Returns:
        the Condition object.
      • onPropertyEquals

        public static Condition onPropertyEquals​(String property,
                                                 String value)
        Specify that the given property should be equal to the given value for a component to be eligible for use.
        Parameters:
        property - the property name.
        Returns:
        the Condition object.
      • onPropertyNotEquals

        public static Condition onPropertyNotEquals​(String property,
                                                    String value)
        Specify that the given property should be equal to the given value for a component to be eligible for use.
        Parameters:
        property - the property name.
        Returns:
        the Condition object.
      • onPropertyMatches

        public static Condition onPropertyMatches​(String property,
                                                  String pattern)
        Specify that the given property should be matched the given pattern for a component to be eligible for use.
        Parameters:
        property - the property name.
        Returns:
        the Condition object.
      • onPropertyTrue

        public static Condition onPropertyTrue​(String property)
        Specify that the given property should be true for a component to be eligible for use.
        Parameters:
        property - the property name.
        Returns:
        the Condition object.
      • onComponents

        public static Condition onComponents​(List<Class> types)
        Specify that components of the given types must be registered for the component to be enabled.
        Parameters:
        types - the components that should be registered.
        Returns:
        the Condition object.
      • onMissingComponent

        public static Condition onMissingComponent​(List<Class> types)
        Specify that components of the given types must be missing for the component to be enabled.
        Parameters:
        types - the components that should be missing.
        Returns:
        the Condition object.