Package net.shibboleth.idp.attribute
Class StringAttributeValue
- java.lang.Object
-
- net.shibboleth.idp.attribute.StringAttributeValue
-
- All Implemented Interfaces:
Comparable<IdPAttributeValue>,IdPAttributeValue
- Direct Known Subclasses:
ScopedStringAttributeValue
public class StringAttributeValue extends Object implements IdPAttributeValue
Base class forIdPAttributevalues that are strings.
-
-
Constructor Summary
Constructors Constructor Description StringAttributeValue(String attributeValue)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetDisplayValue()Get a displayable form of the value for user interfaces and similar purposes.ObjectgetNativeValue()Get the native representation of the value of this attribute.StringgetValue()Return the value.inthashCode()StringtoString()static IdPAttributeValuevalueOf(String value)Returns anEmptyAttributeValueorStringAttributeValueas appropriate.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.shibboleth.idp.attribute.IdPAttributeValue
compareTo
-
-
-
-
Constructor Detail
-
StringAttributeValue
public StringAttributeValue(@Nonnull @NotEmpty @ParameterName(name="attributeValue") String attributeValue)
Constructor.- Parameters:
attributeValue- the attribute value
-
-
Method Detail
-
getNativeValue
public Object getNativeValue()
Get the native representation of the value of this attribute.- Specified by:
getNativeValuein interfaceIdPAttributeValue- Returns:
- the attribute value in native format.
-
getDisplayValue
@Nonnull @NotEmpty public String getDisplayValue()
Get a displayable form of the value for user interfaces and similar purposes.- Specified by:
getDisplayValuein interfaceIdPAttributeValue- Returns:
- a displayable value
-
valueOf
@Nonnull public static IdPAttributeValue valueOf(@Nullable String value)
Returns anEmptyAttributeValueorStringAttributeValueas appropriate. This method should be preferred over the constructor when the value may be null or empty.- Parameters:
value- to inspect- Returns:
EmptyAttributeValueorStringAttributeValue
-
-