Class DelegatePropertySet

    • Constructor Detail

      • DelegatePropertySet

        public DelegatePropertySet()
      • DelegatePropertySet

        public DelegatePropertySet​(PropertySet target)
    • Method Detail

      • setDelegateTarget

        public void setDelegateTarget​(PropertySet value)
      • hasTarget

        public boolean hasTarget()
      • iterator

        public java.util.Iterator<PropertyValue> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<PropertyValue>
      • getValues

        public java.util.List<PropertyValue> getValues()
        Description copied from interface: PropertyValueSource
        Returns the opaque PropertyValue objects. This can be useful when you want to avoid the strict type checking of the value, and it's important to note that if the property is bound, the value will be a BoundValue. Be very careful about overriding, and make sure to maintain the methodology of using getProperties to iterate and get (or getOrDefault), to get the value, because those are all handled differently by BoundPropertySets, ExtendedPropertySets, etc.
        Specified by:
        getValues in interface PropertyValueSource
      • isExtended

        public boolean isExtended​(Property<?> prop)
        Description copied from interface: PropertySet
        Returns whether this property set contains a value for the prop, and the prop was actually inherited. In other words, this is true if the property is inherited, and an override value is present.
        Specified by:
        isExtended in interface PropertySet
      • getOrElse

        public <T> T getOrElse​(Property<T> prop,
                               T value)
        Description copied from interface: PropertyValueSource
        Get the value for a given Property, or else fall back to value if it's not present.
        Specified by:
        getOrElse in interface PropertyValueSource
        Parameters:
        prop - The Property for which a value is to be retrieved.
        value - The value to default to if property isn't present.
        Returns:
        The value of property if present, value if not. Can return null if the value is null.
      • isInherited

        public boolean isInherited​(Property<?> prop)
        Description copied from interface: PropertySet
        Indicates whether the property was inherited from a parent type.
        Specified by:
        isInherited in interface PropertySet