Interface IPropertyValue<T>

Type Parameters:
T - The type of the value.

public sealed interface IPropertyValue<T>
Represents the immutable value of a property.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the property is required.
    boolean
    Checks whether the value is set for this property.
    Gets the type of the value.
    @Nullable T
    Gets the value of this property.
  • Method Details

    • isSet

      boolean isSet()
      Checks whether the value is set for this property.
      Returns:
      true if the value is set, false otherwise.
    • isRequired

      boolean isRequired()
      Checks if the property is required.

      When set to true, the property cannot be removed from the property container and will throw an exception if an attempt is made to do so.

      Returns:
      true if the property is required, false otherwise.
    • value

      @Nullable T value()
      Gets the value of this property.

      The value may be null if the property is not set or if the value is null.

      Returns:
      The value of this property.
    • type

      Class<T> type()
      Gets the type of the value.

      If the value is not set (see isSet()), the type defaults to Object.

      Returns:
      The type of the value.