Class ImmutableAttributes
java.lang.Object
dev.getelements.elements.sdk.util.ImmutableAttributes
- All Implemented Interfaces:
Attributes
A type of
Attributes which is immutable.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.sdk.Attributes
Attributes.Attribute<T> -
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.Attributes
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionasMap()Returns a view of thisAttributesobject as aMap<String,.Object> static ImmutableAttributescopyOf(Attributes attributes) Takes a copy of the suppliedAttributesand returns the result.booleangetAttributeOptional(String name) Gets the attribute associated with thisAttributesobject.inthashCode()Returns a copy of thisAttributesas an immutable copy.stream()Gets allAttributes.Attributes as aStream.static ImmutableAttributesProvides an immutable view of theMapcontaining the attributes.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.Attributes
asProperties, asProperties, getAttribute
-
Method Details
-
viewOf
Provides an immutable view of theMapcontaining the attributes.- Parameters:
attributes- aMapfrom which to provide the view of the attributes- Returns:
- an immutable view of the
Attributes
-
copyOf
Takes a copy of the suppliedAttributesand returns the result.- Parameters:
attributes- theAttributesfrom which to copy this.- Returns:
- a copy of the
Attributes
-
immutableCopy
Description copied from interface:AttributesReturns a copy of thisAttributesas an immutable copy. Alternatively, if this instance is already immutable, then this will return this instance.- Specified by:
immutableCopyin interfaceAttributes- Returns:
- an immutable copy of this
Attributes
-
getAttributeNames
Description copied from interface:Attributes- Specified by:
getAttributeNamesin interfaceAttributes- Returns:
- the
List<String>of attribute names
-
getAttributeOptional
Description copied from interface:AttributesGets the attribute associated with thisAttributesobject.- Specified by:
getAttributeOptionalin interfaceAttributes- Parameters:
name- the name of the attribute to fetch- Returns:
- an
Optional<Object>for the value
-
asMap
Description copied from interface:AttributesReturns a view of thisAttributesobject as aMap<String,.Object> - Specified by:
asMapin interfaceAttributes- Returns:
- this
Attributesas aMap<String,Object>
-
stream
Description copied from interface:AttributesGets allAttributes.Attributes as aStream.- Specified by:
streamin interfaceAttributes- Returns:
- a
StreamofAttributes.Attributes
-
equals
-
hashCode
public int hashCode()
-