Class ComponentMetadata


  • public class ComponentMetadata
    extends Object
    • Constructor Detail

      • ComponentMetadata

        public ComponentMetadata()
        Creates a new ComponentMetadata instance.
    • Method Detail

      • addAttribute

        public void addAttribute​(ComponentAttribute attribute)
        Adds the specified attribute.
        Parameters:
        attribute - the attribute to add.
      • value

        public Optional<Object> value​(String name,
                                      String member)
        Finds the value for the specified attribute name and member.
        Parameters:
        name - the name of the attribute.
        member - the member of the attribute.
        Returns:
        the Optional value.
      • values

        public Collection<Object> values​(String name,
                                         String member)
        Finds all values for the specified attribute name and member.
        Parameters:
        name - the name of the attribute.
        member - the member of the attribute.
        Returns:
        the Optional value.
      • stringValues

        public Collection<String> stringValues​(String name,
                                               String member)
        Gets the string value for the specified attribute name and member.
        Parameters:
        name - the name of the attribute.
        member - the member of the attribute.
        Returns:
        the string value if found, otherwise null.
      • stringValue

        public String stringValue​(String name,
                                  String member)
        Gets the string value for the specified attribute name and member.
        Parameters:
        name - the name of the attribute.
        member - the member of the attribute.
        Returns:
        the string value if found, otherwise null.
      • arrayValue

        public String[] arrayValue​(String name,
                                   String member)
        Gets the array value for the specified attribute name and member.
        Parameters:
        name - the name of the attribute.
        member - the member of the attribute.
        Returns:
        the array value if found, otherwise null.
      • contains

        public boolean contains​(String name,
                                String member,
                                Object value)
        Checks whether the metadata contains the given value for the given attribute name and member.
        Parameters:
        name - the name of the attribute.
        member - the member of the attribute.
        value - the member value.
        Returns:
        true if the value exist, otherwise false.