public class

AttributeMap

extends Object
implements Map<K, V>
java.lang.Object
   ↳ com.atlassian.bitbucket.attribute.AttributeMap

Class Overview

Mutable collection of attributes mapped by string keys. Allows for storing any object as a property value.

See Also

Summary

Public Constructors
AttributeMap()
Public Methods
void clear()
boolean containsKey(Object key)
boolean containsValue(Object value)
@Nonnull Set<Entry<String, Object>> entrySet()
boolean equals(Object o)
Object get(Object key)
@Nullable <E, I extends Iterable<E>> I getAs(String key, Class<I> iterableType, Class<E> elementType)
Convenience method to return the property value as an instance of Iterable with element type E.
@Nullable <T> T getAs(String key, Class<T> expectedType)
int hashCode()
boolean isEmpty()
@Nonnull Set<String> keySet()
Object put(String key, Object value)
void putAll(Map<? extends String, ?> m)
Object remove(Object key)
int size()
@Nonnull Collection<Object> values()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Map

Public Constructors

public AttributeMap ()

Public Methods

public void clear ()

public boolean containsKey (Object key)

public boolean containsValue (Object value)

@Nonnull public Set<Entry<String, Object>> entrySet ()

public boolean equals (Object o)

public Object get (Object key)

@Nullable public I getAs (String key, Class<I> iterableType, Class<E> elementType)

Convenience method to return the property value as an instance of Iterable with element type E.

Parameters
key property key
iterableType class representing the expected type of the iterable
elementType class representing the expected type of the elements
Returns
  • property value, as an instance of I, or null, if this property map does not contain a property with key key
Throws
ClassCastException if the property exists, but is not of expected type iterableType

@Nullable public T getAs (String key, Class<T> expectedType)

public int hashCode ()

public boolean isEmpty ()

@Nonnull public Set<String> keySet ()

public Object put (String key, Object value)

public void putAll (Map<? extends String, ?> m)

public Object remove (Object key)

public int size ()

@Nonnull public Collection<Object> values ()