com.atlassian.crowd.embedded.impl
Class ImmutableAttributes

java.lang.Object
  extended by com.atlassian.crowd.embedded.impl.ImmutableAttributes
All Implemented Interfaces:
Attributes, java.io.Serializable

public final class ImmutableAttributes
extends java.lang.Object
implements Attributes, java.io.Serializable

A general purpose immutable implementation of the Attributes interface.

See Also:
Serialized Form

Constructor Summary
ImmutableAttributes()
          Constructs an empty immutable Attributes object.
ImmutableAttributes(Attributes attributes)
          Constructs an immutable copy of the passed in attributes.
ImmutableAttributes(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributesMap)
          Constructs an immutable Attributes object from the given Map.
 
Method Summary
 java.util.Set<java.lang.String> getKeys()
           
 java.lang.String getValue(java.lang.String key)
           
 java.util.Set<java.lang.String> getValues(java.lang.String key)
           
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmutableAttributes

public ImmutableAttributes()
Constructs an empty immutable Attributes object.


ImmutableAttributes

public ImmutableAttributes(@NotNull
                           java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributesMap)
Constructs an immutable Attributes object from the given Map. An immutable copy of the incoming map is built, so the passed map does not need to be immutable itself.

Parameters:
attributesMap - The incoming attributes Map.

ImmutableAttributes

public ImmutableAttributes(@NotNull
                           Attributes attributes)
Constructs an immutable copy of the passed in attributes.

Parameters:
attributes - to clone.
Method Detail

getValues

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

getValue

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

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


Copyright © 2012 Atlassian. All Rights Reserved.