Class AttributeMap
java.lang.Object
com.atlassian.bitbucket.attribute.AttributeMap
Mutable collection of attributes mapped by string keys. Allows for storing any object as a property value.
- Since:
- 5.13
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier 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()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
AttributeMap
public AttributeMap()
-
-
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 elementI- type of the iterable- Parameters:
key- property keyiterableType- class representing the expected type of the iterableelementType- 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 typeiterableType
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
entrySet
-
equals
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-