Class PropertySet


  • public final class PropertySet
    extends Object
    A set of properties. Instances of this class can be used as the core of a managed object implementation.
    • Constructor Detail

      • PropertySet

        public PropertySet()
    • Method Detail

      • addProperty

        public <T> void addProperty​(PropertyDefinition<T> pd,
                                    Collection<ValueOrExpression<T>> defaultValues,
                                    Collection<ValueOrExpression<T>> activeValues)
        Creates a property with the provided sets of pre-validated default and active values.
        Type Parameters:
        T - The type of the property.
        Parameters:
        pd - The property definition.
        defaultValues - The set of default values for the property.
        activeValues - The set of active values for the property.
      • getProperty

        public <T> Property<T> getProperty​(PropertyDefinition<T> d)
        Get the property associated with the specified property definition.
        Type Parameters:
        T - The underlying type of the property.
        Parameters:
        d - The Property definition.
        Returns:
        Returns the property associated with the specified property definition.
        Throws:
        IllegalArgumentException - If this property provider does not recognise the requested property definition.