Class GrainsRegEx

    • Field Detail

      • key

        protected final String key
      • value

        protected final String value
      • delimiter

        protected final char delimiter
      • target

        protected final T target
    • Constructor Detail

      • GrainsRegEx

        public GrainsRegEx​(String target)
        Creates a grains matcher
        Parameters:
        target - the targeting expression
      • GrainsRegEx

        public GrainsRegEx​(String target,
                           char delimiter)
        Creates a grains matcher
        Parameters:
        target - the targeting expression
        delimiter - the character to delimit nesting in the grain name
      • GrainsRegEx

        public GrainsRegEx​(String grain,
                           String regex)
        Creates a grains matcher
        Parameters:
        grain - the grain name
        regex - the regular expression to match
      • GrainsRegEx

        public GrainsRegEx​(String grain,
                           String regex,
                           char delimiter)
        Creates a grains matcher
        Parameters:
        grain - the grain name
        regex - the regular expression to match
        delimiter - the character to delimit nesting in the grain name
    • Method Detail

      • getKey

        public String getKey()
        Returns:
        the grain name of this matcher
      • getValue

        public String getValue()
        Returns:
        the value to match the grain
      • getDelimiter

        public char getDelimiter()
        Returns:
        the delimiter used by this target
      • getProps

        public Map<String,​Object> getProps()
        Returns:
        a map of items to include in the API call payload This will include the 'delimiter' key if not using the default delimiter.
      • getTarget

        public T getTarget()