Class AttributeImpl
java.lang.Object
org.glassfish.security.services.impl.common.AttributeImpl
- All Implemented Interfaces:
Attribute
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAttributeImpl(String name) AttributeImpl(String name, String value) AttributeImpl(String name, String[] values) AttributeImpl(String name, Set<String> values) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidclear()getName()Get the name of this attribute.getValue()Get the first value from the Set of attribute values, or null if the attribute has no values.intGet a count of the number of values this attribute has (0-n).Get the Set of values for this attribute.String[]Return the attributes values as a String array.voidremoveValue(String value) voidremoveValues(String[] values) voidremoveValues(Set<String> values)
-
Constructor Details
-
AttributeImpl
protected AttributeImpl() -
AttributeImpl
-
AttributeImpl
-
AttributeImpl
-
AttributeImpl
-
-
Method Details
-
getValueCount
public int getValueCount()Description copied from interface:AttributeGet a count of the number of values this attribute has (0-n).- Specified by:
getValueCountin interfaceAttribute- Returns:
- The value count.
-
getName
Description copied from interface:AttributeGet the name of this attribute. -
getValue
Description copied from interface:AttributeGet the first value from the Set of attribute values, or null if the attribute has no values. This is a shorthand method that should be useful for single-valued attributes, but note that there are no guarantees about which value is returned in the case that there are multiple values. The value returned will be whichever value the underlying Set implementation returns first. -
getValues
Description copied from interface:AttributeGet the Set of values for this attribute. The Set returned is a copy of the original; changes to this Set will not affect the original. -
getValuesAsArray
Description copied from interface:AttributeReturn the attributes values as a String array. Note that this array can be zero-length in the case that there are no values.- Specified by:
getValuesAsArrayin interfaceAttribute- Returns:
- The attribute values array.
-
addValue
-
addValues
-
addValues
-
removeValue
- Specified by:
removeValuein interfaceAttribute
-
removeValues
- Specified by:
removeValuesin interfaceAttribute
-
removeValues
- Specified by:
removeValuesin interfaceAttribute
-
clear
public void clear()
-