|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.directory.AttributeValuesHolder
public class AttributeValuesHolder
Concrete implementation of Attributes interface. This is useful for places where we want 'composition' instead of 'inheritence'.
Constructor Summary | |
---|---|
AttributeValuesHolder(Map<String,String> attributes)
|
Method Summary | |
---|---|
boolean |
getAttributeAsBoolean(String name,
boolean defaultValue)
|
long |
getAttributeAsLong(String name,
long defaultValue)
|
Map<String,String> |
getAttributes()
|
Set<String> |
getKeys()
Gets all the keys of the attributes. |
String |
getValue(String name)
Returns any value associated with the given key, returns null if there is no value. |
Set<String> |
getValues(String name)
Get all the values associated with a given key. |
boolean |
isEmpty()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeValuesHolder(Map<String,String> attributes)
Method Detail |
---|
public Set<String> getValues(String name)
Attributes
getValues
in interface Attributes
name
- the key to retrieve the values for
public String getValue(String name)
Attributes
null
if there is no value.
getValue
in interface Attributes
name
- the key to retrieve the value for
null
if there is no valuepublic long getAttributeAsLong(String name, long defaultValue)
public boolean getAttributeAsBoolean(String name, boolean defaultValue)
public Set<String> getKeys()
Attributes
getKeys
in interface Attributes
public boolean isEmpty()
isEmpty
in interface Attributes
true
if there are no attributespublic Map<String,String> getAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |