Class ValueProxy

java.lang.Object
ch.nolix.system.property.proxy.ValueProxy
All Implemented Interfaces:
INameHolder, MaterializationRequestable, IProperty, IValueProxy

public final class ValueProxy extends Object implements IValueProxy
Author:
Silvan Wyss
  • Method Details

    • withNameAndValueSpecificationConsumerAndValueSpecificationSupplier

      public static ValueProxy withNameAndValueSpecificationConsumerAndValueSpecificationSupplier(String name, Consumer<INode<?>> valueSpecificationConsumer, Supplier<INode<?>> valueSpecificationSupplier)
      Parameters:
      name -
      valueSpecificationConsumer -
      valueSpecificationSupplier -
      Returns:
      a new ValueProxy with the given name, valueSpecificationConsumer and valueSpecificationSupplier.
      Throws:
      RuntimeException - if the given name is null or blank.
      RuntimeException - if the given valueSpecificationConsumer is null.
      RuntimeException - if the given valueSpecificationSupplier is null.
    • addedOrChangedAttribute

      public boolean addedOrChangedAttribute(INode<?> attribute)
      Adds or changes the given attribute to the current IProperty if the given attribute is for the current IProperty.
      Specified by:
      addedOrChangedAttribute in interface IProperty
      Parameters:
      attribute -
      Returns:
      true if the given attribute was added or changed to the current IProperty, false otherwise.
    • getName

      public String getName()
      Specified by:
      getName in interface INameHolder
      Returns:
      the name of the current INameHolder.
    • fillUpAttributesIntoList

      public void fillUpAttributesIntoList(ILinkedList<INode<?>> list)
      Fills up the attributes of the current IProperty into the given list.
      Specified by:
      fillUpAttributesIntoList in interface IProperty
      Parameters:
      list -
    • isMaterialized

      public boolean isMaterialized()
      Specified by:
      isMaterialized in interface MaterializationRequestable
      Returns:
      true if the current MaterializationRequestable is materialized, false otherwise.