Interface IPropertyHolderConst
- All Known Subinterfaces:
IPropertyContainerConst,IPropertyHolder,IStructureConst,IStructureWithBlocksToMove,IStructureWithOpenStatus,IStructureWithQuarterCircles,IStructureWithRotationPoint
- All Known Implementing Classes:
PropertyContainer,PropertyContainerSnapshot,Structure,StructureSnapshot
public interface IPropertyHolderConst
Represents a read-only property holder.
-
Method Summary
Modifier and TypeMethodDescription<T> IPropertyValue<T> getPropertyValue(Property<T> property) Gets the value of the given property.default <T> TgetRequiredPropertyValue(Property<T> property) Gets the value of a required property.booleanhasProperties(Collection<Property<?>> properties) Checks if this property holder has all the given properties.default booleanhasProperties(SequencedCollection<Property<?>> properties) Checks if this property holder has all the given properties.default booleanhasProperties(Property<?>... properties) Checks if this property holder has all the given properties.booleanhasProperty(Property<?> property) Checks if the given property has a value set.
-
Method Details
-
getPropertyValue
Gets the value of the given property.- Type Parameters:
T- The type of the property.- Parameters:
property- The property to get the value of.- Returns:
- The value of the property.
-
getRequiredPropertyValue
Gets the value of a required property.If the property has no value set or the value is
null, aNullPointerExceptionis thrown.- Type Parameters:
T- The type of the property.- Parameters:
property- The property to get the value of.- Returns:
- The raw value of the property.
- Throws:
NullPointerException- If the property has no value set or the value isnull.
-
hasProperty
Checks if the given property has a value set.- Parameters:
property- The property to check.- Returns:
trueif the property has a value set,falseotherwise.
-
hasProperties
Checks if this property holder has all the given properties.- Parameters:
properties- The properties to check.- Returns:
trueif this property holder has all the given properties,falseotherwise.
-
hasProperties
Checks if this property holder has all the given properties.- Parameters:
properties- The properties to check.- Returns:
trueif this property holder has all the given properties,falseotherwise.
-
hasProperties
Checks if this property holder has all the given properties.- Parameters:
properties- The properties to check.- Returns:
trueif this property holder has all the given properties,falseotherwise.
-