Class ComponentMetadata
- java.lang.Object
-
- io.streamthoughts.azkarra.api.components.ComponentMetadata
-
public class ComponentMetadata extends Object
-
-
Constructor Summary
Constructors Constructor Description ComponentMetadata()Creates a newComponentMetadatainstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(ComponentAttribute attribute)Adds the specified attribute.String[]arrayValue(String name, String member)Gets the array value for the specified attribute name and member.Collection<ComponentAttribute>attributes()Gets all attributes.Collection<ComponentAttribute>attributesForName(String name)Gets all attributes for the given name.booleancontains(String name, String member, Object value)Checks whether the metadata contains the given value for the given attribute name and member.StringstringValue(String name, String member)Gets the string value for the specified attribute name and member.Collection<String>stringValues(String name, String member)Gets the string value for the specified attribute name and member.Optional<Object>value(String name, String member)Finds the value for the specified attribute name and member.Collection<Object>values(String name, String member)Finds all values for the specified attribute name and member.
-
-
-
Constructor Detail
-
ComponentMetadata
public ComponentMetadata()
Creates a newComponentMetadatainstance.
-
-
Method Detail
-
attributes
public Collection<ComponentAttribute> attributes()
Gets all attributes.- Returns:
- the list of
ComponentAttribute.
-
addAttribute
public void addAttribute(ComponentAttribute attribute)
Adds the specified attribute.- Parameters:
attribute- the attribute to add.
-
attributesForName
public Collection<ComponentAttribute> attributesForName(String name)
Gets all attributes for the given name.- Parameters:
name- the name of attributes.- Returns:
- the list of matching
ComponentAttribute.
-
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
Optionalvalue.
-
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
Optionalvalue.
-
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:
trueif the value exist, otherwisefalse.
-
-