Class PropertyContainerSnapshot
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.structures.properties.PropertyContainerSnapshot
- All Implemented Interfaces:
Iterable<PropertyValuePair<?>>,IPropertyContainerConst,IPropertyHolderConst
@ThreadSafe
public final class PropertyContainerSnapshot
extends Object
implements IPropertyHolderConst, IPropertyContainerConst
Represents a read-only snapshot of a property container.
Instances of this class are immutable.
New instances can be created using PropertyContainer.snapshot().
-
Method Summary
Modifier and TypeMethodDescriptionbooleanMap<String, IPropertyValue<?>> getMap()Gets the map of properties.<T> IPropertyValue<T> getPropertyValue(Property<T> property) Gets the value of the given property.inthashCode()booleanhasProperties(Collection<Property<?>> properties) Checks if this property holder has all the given properties.booleanhasProperty(Property<?> property) Checks if the given property has a value set.@NotNull Iterator<PropertyValuePair<?>> iterator()Returns a read-only iterator over the properties in this container.Returns a read-only spliterator over the properties in this container.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.structures.properties.IPropertyContainerConst
streamMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.structures.properties.IPropertyHolderConst
getRequiredPropertyValue, hasProperties, hasProperties
-
Method Details
-
getPropertyValue
Description copied from interface:IPropertyHolderConstGets the value of the given property.- Specified by:
getPropertyValuein interfaceIPropertyHolderConst- Type Parameters:
T- The type of the property.- Parameters:
property- The property to get the value of.- Returns:
- The value of the property.
-
hasProperty
Description copied from interface:IPropertyHolderConstChecks if the given property has a value set.- Specified by:
hasPropertyin interfaceIPropertyHolderConst- Parameters:
property- The property to check.- Returns:
trueif the property has a value set,falseotherwise.
-
hasProperties
Description copied from interface:IPropertyHolderConstChecks if this property holder has all the given properties.- Specified by:
hasPropertiesin interfaceIPropertyHolderConst- Parameters:
properties- The properties to check.- Returns:
trueif this property holder has all the given properties,falseotherwise.
-
getMap
Gets the map of properties.- Returns:
- An unmodifiable map of properties.
-
iterator
Description copied from interface:IPropertyContainerConstReturns a read-only iterator over the properties in this container.Any properties that are either unmapped or of the wrong type are excluded.
- Specified by:
iteratorin interfaceIPropertyContainerConst- Specified by:
iteratorin interfaceIterable<PropertyValuePair<?>>- Returns:
- A read-only iterator over the properties in this container.
-
spliterator
Description copied from interface:IPropertyContainerConstReturns a read-only spliterator over the properties in this container.Any properties that are either unmapped or of the wrong type are excluded.
- Specified by:
spliteratorin interfaceIPropertyContainerConst- Specified by:
spliteratorin interfaceIterable<PropertyValuePair<?>>- Returns:
- A read-only spliterator over the properties in this container.
-
toString
-
equals
-
hashCode
public int hashCode()
-