public class Attribute
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Attribute(java.lang.String name)
Create a credential attribute with the specified name.
|
Attribute(java.lang.String name,
java.util.Set<java.lang.String> values)
Create a credential attribute with the specified name and the specified
value set.
|
Attribute(java.lang.String name,
java.lang.String value)
Create a credential attribute with the specified name and a value set
containing the specified value.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(java.lang.String value)
Add the specified value to the value set.
|
boolean |
equals(java.lang.Object object)
Check whether the specified object is equal to this credential attribute.
|
java.lang.String |
getName()
Get the name.
|
java.util.Set<java.lang.String> |
getValues()
Get the value set.
|
int |
hashCode()
Get the hash code of this credential attribute.
|
boolean |
hasValue(java.lang.String value)
Check whether the specified value is contained in the value set.
|
void |
removeValue(java.lang.String value)
Remove the specified value from the value set of this credential
attribute.
|
void |
setValues(java.util.Set<java.lang.String> values)
Set the value set.
|
public Attribute(java.lang.String name)
name
- The name.public Attribute(java.lang.String name, java.lang.String value)
name
- The name.value
- The value.public Attribute(java.lang.String name, java.util.Set<java.lang.String> values)
name
- The name.values
- The value set.public java.lang.String getName()
public java.util.Set<java.lang.String> getValues()
setValues(Set)
to persist the modifications.public void setValues(java.util.Set<java.lang.String> values)
values
- The value set.public void addValue(java.lang.String value)
value
- The value.public boolean hasValue(java.lang.String value)
value
- The value.public void removeValue(java.lang.String value)
value
- The value.public boolean equals(java.lang.Object object)
Attribute
, and (2) the name of the
object is equal to the name of this credential attribute.equals
in class java.lang.Object
object
- The object.public int hashCode()
hashCode
in class java.lang.Object