Class MultiValueProxy<V>
java.lang.Object
ch.nolix.system.property.proxy.MultiValueProxy<V>
- Type Parameters:
V- the type of the values aMultiValueProxyforwards.
- All Implemented Interfaces:
NameHolder, 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<ExtendedIterable<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 MaterializationRequestable
isViewMethods inherited from interface NameHolder
getNameInSingleQuotes, hasName, hasSameNameAs
-
Method Details
-
withNameAndAdderAndGetterAndValueMapperAndSpecificationMapper
public static <T> MultiValueProxy<T> withNameAndAdderAndGetterAndValueMapperAndSpecificationMapper(String name, Consumer<T> adder, Supplier<ExtendedIterable<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 nullRuntimeException- if the given getter is nullRuntimeException- if the given valueMapper is nullRuntimeException- 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 interfaceNameHolder- Returns:
- the name of the current
NameHolder
-
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.
-