Class Requirement

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Requirement.MatchType  
    • Constructor Summary

      Constructors 
      Constructor Description
      Requirement​(java.lang.String key)
      Specifies an "exists" requirement with a specified key.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected RequirementProperties build()  
      static Requirement equals​(java.lang.String key, java.lang.String value)
      Specifies a requirement that a capability with matching key has value equal to value of requirement.
      static Requirement exists​(java.lang.String key)
      Specifies a requirement that a capability with matching key exists.
      static Requirement matches​(java.lang.String key, java.lang.String regexp)
      Specifies a requirement that a capability with matching key has value that matches regexp provided in value of requirement.
      Requirement matchType​(Requirement.MatchType matchType)
      Sets a match type.
      Requirement matchValue​(java.lang.String value)
      Sets a requirement value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Requirement

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

      • exists

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

        public static Requirement equals​(java.lang.String key,
                                         java.lang.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​(java.lang.String key,
                                          java.lang.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​(java.lang.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