Interface IPropertyHolderConst

All Known Subinterfaces:
IPropertyContainerConst, IPropertyHolder, IStructureConst
All Known Implementing Classes:
PropertyContainer, PropertyContainerSnapshot, Structure, StructureSnapshot

public interface IPropertyHolderConst
Represents a read-only property holder.
  • Method Details

    • getPropertyValue

      <T> IPropertyValue<T> getPropertyValue(Property<T> property)
      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

      default <T> T getRequiredPropertyValue(Property<T> property)
      Gets the value of a required property.

      If the property has no value set or the value is null, a NullPointerException is 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 is null.
    • hasProperty

      boolean hasProperty(Property<?> property)
      Checks if the given property has a value set.
      Parameters:
      property - The property to check.
      Returns:
      true if the property has a value set, false otherwise.
    • hasProperties

      default boolean hasProperties(Property<?>... properties)
      Checks if this property holder has all the given properties.
      Parameters:
      properties - The properties to check.
      Returns:
      true if this property holder has all the given properties, false otherwise.
    • hasProperties

      default boolean hasProperties(SequencedCollection<Property<?>> properties)
      Checks if this property holder has all the given properties.
      Parameters:
      properties - The properties to check.
      Returns:
      true if this property holder has all the given properties, false otherwise.
    • hasProperties

      boolean hasProperties(Collection<Property<?>> properties)
      Checks if this property holder has all the given properties.
      Parameters:
      properties - The properties to check.
      Returns:
      true if this property holder has all the given properties, false otherwise.
    • propertyCount

      int propertyCount()
      Gets the number of properties in this property container.

      This is the number of entries in the property map.

      Returns:
      The number of properties in this property container.