Package com.atlassian.bitbucket.property
Class PropertyMap
java.lang.Object
com.atlassian.bitbucket.property.PropertyMap
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:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()boolean<E,I extends Iterable<E>> 
 IConvenience method to return the property value as an instance ofIterablewith element typeE.<T> TinthashCode()booleanisEmpty()keySet()voidintsize()toString()values()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Field Details- 
EMPTY
 
- 
- 
Method Details- 
getAs
- 
getAs@Nullable public <E,I extends Iterable<E>> I getAs(@Nonnull String key, @Nonnull Class<I> iterableType, @Nonnull Class<E> elementType) Convenience method to return the property value as an instance ofIterablewith element typeE.- Type Parameters:
- E- type of the element
- I- type of the iterable
- 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, ornull, if this property map does not contain a property with keykey
- Throws:
- ClassCastException- if the property exists, but is not of expected type- iterableType
 
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()
- 
containsKey- Specified by:
- containsKeyin interface- Map<String,- Object> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<String,- Object> 
 
- 
get
- 
put
- 
remove
- 
putAll
- 
clearpublic void clear()
- 
keySet
- 
values
- 
entrySet
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-