Class Requirement

    • Constructor Detail

      • Requirement

        public Requirement​(String key)
        Specifies an "exists" requirement with a specified key.
        Parameters:
        key - requirement key
    • Method Detail

      • exists

        public static Requirement exists​(String key)
        Specifies a requirement that a capability with matching key exists.
        Parameters:
        key - requirement key
      • equals

        public static Requirement equals​(String key,
                                         String value)
        Specifies a requirement that a capability with matching key has value equal to value of requirement.
        Parameters:
        key - requirement key
        value - requirement value
      • matches

        public static Requirement matches​(String key,
                                          String regexp)
        Specifies a requirement that a capability with matching key has value that matches regexp provided in value of requirement.
        Parameters:
        key - requirement key
        regexp - requirement value, in Java format
        See Also:
        Pattern
      • matchValue

        public Requirement matchValue​(String value)
        Sets a requirement value. Depending on the match type should be a string or a Java regular expression.
      • matchType

        public Requirement matchType​(Requirement.MatchType matchType)
        Sets a match type. Possible values are:
        EXISTS
        A capability with a matching key must exist, the value is not checked
        EQUALS
        A capability with a matching key must exist and its value must be equal to value of requirement
        MATCHES
        A capability with a matching key must exist and its value must match the value of requirement interpreted as Java regular expression