com.atlassian.crowd.directory
Class AttributeValuesHolder

java.lang.Object
  extended by com.atlassian.crowd.directory.AttributeValuesHolder
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.Attributes

public class AttributeValuesHolder
extends Object
implements com.atlassian.crowd.embedded.api.Attributes

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()
           
 String getValue(String name)
           
 Set<String> getValues(String name)
           
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeValuesHolder

public AttributeValuesHolder(Map<String,String> attributes)
Method Detail

getValues

public Set<String> getValues(String name)
Specified by:
getValues in interface com.atlassian.crowd.embedded.api.Attributes

getValue

public String getValue(String name)
Specified by:
getValue in interface com.atlassian.crowd.embedded.api.Attributes

getAttributeAsLong

public long getAttributeAsLong(String name,
                               long defaultValue)

getAttributeAsBoolean

public boolean getAttributeAsBoolean(String name,
                                     boolean defaultValue)

getKeys

public Set<String> getKeys()
Specified by:
getKeys in interface com.atlassian.crowd.embedded.api.Attributes

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface com.atlassian.crowd.embedded.api.Attributes

getAttributes

public Map<String,String> getAttributes()


Copyright © 2014 Atlassian. All Rights Reserved.