public class

PropertyMap

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

Class Overview

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

It is strongly encouraged that the property values can be marshalled to/from JSON, or they will not be included in REST responses.

See Also

Summary

Nested Classes
class PropertyMap.Builder  
Fields
public static final PropertyMap EMPTY
Public Methods
void clear()
boolean containsKey(Object key)
boolean containsValue(Object value)
@Nonnull Set<Entry<String, Object>> entrySet()
boolean equals(Object obj)
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, ?> other)
Object remove(Object key)
int size()
String toString()
@Nonnull Collection<Object> values()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Map

Fields

public static final PropertyMap EMPTY

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 obj)

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, ?> other)

public Object remove (Object key)

public int size ()

public String toString ()

@Nonnull public Collection<Object> values ()