Class MultiValueProxy<V>
java.lang.Object
ch.nolix.system.property.proxy.MultiValueProxy<V>
- Type Parameters:
V- is the type of the values aMultiValueProxyforwards.
- All Implemented Interfaces:
INameHolder, EmptinessRequestable, MaterializationRequestable, IProperty, IMultiValueProxy
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddedOrChangedAttribute(INode<?> attribute) voidfillUpAttributesIntoList(ILinkedList<INode<?>> list) Fills up the attributes of the currentIPropertyinto the given list.getName()booleanisEmpty()booleanstatic <T> MultiValueProxy<T> withNameAndAdderAndGetterAndValueMapperAndSpecificationMapper(String name, Consumer<T> adder, Supplier<IContainer<T>> getter, Function<INode<?>, T> valueMapper, Function<T, INode<?>> specificationMapper) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface INameHolder
getNameInQuotes, hasName, hasSameNameAsMethods inherited from interface MaterializationRequestable
isView
-
Method Details
-
withNameAndAdderAndGetterAndValueMapperAndSpecificationMapper
public static <T> MultiValueProxy<T> withNameAndAdderAndGetterAndValueMapperAndSpecificationMapper(String name, Consumer<T> adder, Supplier<IContainer<T>> getter, Function<INode<?>, T> valueMapper, Function<T, INode<?>> specificationMapper) - Type Parameters:
T- is the type of the values the createdMultiValueProxyforwards.- Parameters:
name-adder-getter-valueMapper-specificationMapper-- Returns:
- a new
MultiValueProxywith the given name, adder, getter, valueMapper and specificationMapper. - Throws:
RuntimeException- if the given name is null or blank.RuntimeException- if the given adder is null.RuntimeException- if the given getter is null.RuntimeException- if the given valueMapper is null.RuntimeException- if the given specificationMapper is null.
-
addedOrChangedAttribute
Adds or changes the given attribute to the currentIPropertyif the given attribute is for the currentIProperty.- Specified by:
addedOrChangedAttributein interfaceIProperty- Parameters:
attribute-- Returns:
- true if the given attribute was added or changed to the current
IProperty, false otherwise.
-
fillUpAttributesIntoList
Fills up the attributes of the currentIPropertyinto the given list.- Specified by:
fillUpAttributesIntoListin interfaceIProperty- Parameters:
list-
-
getName
- Specified by:
getNamein interfaceINameHolder- Returns:
- the name of the current
INameHolder.
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise.
-
isMaterialized
public boolean isMaterialized()- Specified by:
isMaterializedin interfaceMaterializationRequestable- Returns:
- true if the current
MaterializationRequestableis materialized, false otherwise.
-