Interface Attributes
public interface Attributes
Holds attributes, their values and provides utlity methods to manage them.
In the future, it may be useful to provide different implementations for this interface in order to plug or integrate with different Policy Information Point (PIP).
- Author:
- Pedro Igor
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Holds an attribute and its values, providing useful methods for obtaining and formatting values. -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
containsValue
(String name, String value) Checks if there is an attribute with the givenname
andvalue
.default boolean
Checks if there is an attribute with the givenname
.static Attributes
from
(Map<String, Collection<String>> attributes) default Attributes.Entry
Returns aAttributes.Entry
from where values can be obtained and parsed accordingly.toMap()
Converts to aMap
.
-
Method Details
-
from
-
toMap
Map<String,Collection<String>> toMap()Converts to aMap
.- Returns:
-
exists
Checks if there is an attribute with the givenname
.- Parameters:
name
- the attribute name- Returns:
- true if any attribute with
name
exist. Otherwise, returns false.
-
containsValue
Checks if there is an attribute with the givenname
andvalue
.- Parameters:
name
- the attribute namevalue
- the attribute value- Returns:
- true if any attribute with
name
andvalue
exist. Otherwise, returns false.
-
getValue
Returns aAttributes.Entry
from where values can be obtained and parsed accordingly.- Parameters:
name
- the attribute name- Returns:
- an
Attributes.Entry
holding the values for an attribute
-