com.atlassian.crowd.directory
Class AttributeValuesHolder

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

public class AttributeValuesHolder
extends java.lang.Object
implements Attributes

Concrete implementation of Attributes interface. This is useful for places where we want 'composition' instead of 'inheritence'.


Constructor Summary
AttributeValuesHolder(java.util.Map<java.lang.String,java.lang.String> attributes)
           
 
Method Summary
 boolean getAttributeAsBoolean(java.lang.String name, boolean defaultValue)
           
 long getAttributeAsLong(java.lang.String name, long defaultValue)
           
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
           
 java.util.Set<java.lang.String> getKeys()
           
 java.lang.String getValue(java.lang.String name)
           
 java.util.Set<java.lang.String> getValues(java.lang.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(java.util.Map<java.lang.String,java.lang.String> attributes)
Method Detail

getValues

public java.util.Set<java.lang.String> getValues(java.lang.String name)
Specified by:
getValues in interface Attributes

getValue

public java.lang.String getValue(java.lang.String name)
Specified by:
getValue in interface Attributes

getAttributeAsLong

public long getAttributeAsLong(java.lang.String name,
                               long defaultValue)

getAttributeAsBoolean

public boolean getAttributeAsBoolean(java.lang.String name,
                                     boolean defaultValue)

getKeys

public java.util.Set<java.lang.String> getKeys()
Specified by:
getKeys in interface Attributes

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Attributes

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()


Copyright © 2012 Atlassian. All Rights Reserved.