public class

AttributeMap

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

Class Overview

Immutable String -> String multimap. This class is mostly for convenience and readability. It implements the Map&lt;String, Set&lt;String&gt;&gt; interface.

Summary

Nested Classes
class AttributeMap.Builder Builder class for AttributeMap  
Fields
public static final AttributeMap EMPTY
Public Constructors
AttributeMap()
This constructor is deprecated. in 2.8 for removal in 3.0, please use AttributeMap.Builder instead.
@Deprecated AttributeMap(Map<String, Set<String>> map)
This constructor is deprecated. in 2.8 for removal in 3.0, please use AttributeMap.Builder instead.
Public Methods
void clear()
Not supported for AttributeMap
boolean containsKey(Object key)
boolean containsValue(Object value)
Set<Entry<String, Set<String>>> entrySet()
boolean equals(Object o)
Set<String> get(Object attributeName)
int hashCode()
boolean isEmpty()
Set<String> keySet()
Set<String> put(String key, Set<String> values)
Not supported for AttributeMap
void putAll(Map<? extends String, ? extends Set<String>> map)
Not supported for AttributeMap
Set<String> remove(Object key)
Not supported for AttributeMap
int size()
Collection<Set<String>> values()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Map

Fields

public static final AttributeMap EMPTY

Public Constructors

public AttributeMap ()

This constructor is deprecated.
in 2.8 for removal in 3.0, please use AttributeMap.Builder instead.

@Deprecated public AttributeMap (Map<String, Set<String>> map)

This constructor is deprecated.
in 2.8 for removal in 3.0, please use AttributeMap.Builder instead.

Public Methods

public void clear ()

Not supported for AttributeMap

Throws
UnsupportedOperationException when called

public boolean containsKey (Object key)

Parameters
key the key to check
Returns
  • true if there are any values associated with key

public boolean containsValue (Object value)

Parameters
value the value
Returns
  • true if the value is present in the AtrtibuteMap (associated with any attributeName)

public Set<Entry<String, Set<String>>> entrySet ()

Returns
  • the attributeName -> attributeValues entry set

public boolean equals (Object o)

public Set<String> get (Object attributeName)

Parameters
attributeName the attributeName
Returns
  • the set of values associated with attributeName. Is null if no values are associated with attributeName

public int hashCode ()

public boolean isEmpty ()

Returns
  • true if the AttributeMap is empty

public Set<String> keySet ()

public Set<String> put (String key, Set<String> values)

Not supported for AttributeMap

Parameters
key the attribute name
values attribute values
Returns
  • -
Throws
UnsupportedOperationException when called

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

Not supported for AttributeMap

Parameters
map the map of attributes to add
Throws
UnsupportedOperationException when called

public Set<String> remove (Object key)

Not supported for AttributeMap

Parameters
key the attribute name
Returns
  • -
Throws
UnsupportedOperationException when called

public int size ()

Returns
  • the size of the attributeMap

public Collection<Set<String>> values ()

Returns
  • the collection of all attributeValues