Package ch.nolix.system.element.property
Klasse MultiValue<V>
java.lang.Object
ch.nolix.system.element.property.AbstractValue<V>
ch.nolix.system.element.property.MultiValue<V>
- Typparameter:
V- is the type of the values of aMultiValue.
- Alle implementierten Schnittstellen:
INameHolder,Clearable,EmptinessRequestable,MutabilityRequestable,IBaseValue,IProperty
- Version:
- 2018-03-04
- Autor:
- Silvan Wyss
-
Feldübersicht
Von Klasse geerbte Felder ch.nolix.system.element.property.AbstractValue
specificationCreator -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidAdds the given value to the currentMultiValue.protected voidaddOrChangeValue(V value) Adds or change the given value to the currentAbstractValue.voidclear()Removes the elements of the currentClearable.voidfillUpAttributesInto(ILinkedList<INode<?>> list) static MultiValue<Integer> static MultiValue<String> forStrings(String name, Consumer<String> adderMethod) booleanisEmpty()booleanvoidRemoves the given value of the currentMultiValue.Removes and returns the last value of the currentMultiValue.Removes the last value of the currentMultiValue.Von Klasse geerbte Methoden ch.nolix.system.element.property.AbstractValue
addedOrChangedAttribute, getNameVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.EmptinessRequestable
containsAnyVon Schnittstelle geerbte Methoden ch.nolix.coreapi.attribute.mandatoryattribute.INameHolder
getNameInQuotes, hasName, hasSameNameAsVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.MutabilityRequestable
isImmutable
-
Konstruktordetails
-
MultiValue
public MultiValue(String name, Consumer<V> adderMethod, Function<INode<?>, V> valueCreator, Function<V, INode<?>> specificationCreator) Creates a newMultiValuewith the given name, valueCreator, adderMethod and specificationCreator.- Parameter:
name-adderMethod-valueCreator-specificationCreator-- Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.ArgumentIsNullException- if the given adderMethod is null.ArgumentIsNullException- if the given valueCreator is null.ArgumentIsNullException- if the given specificationCreator is null.
-
-
Methodendetails
-
forInts
- Parameter:
name-adderMethod-- Gibt zurück:
- a new
MultiValuethat will storeIntegers and have the given name and setterMethod. - Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.ArgumentIsNullException- if the given adderMethod is null.
-
forStrings
- Parameter:
name-adderMethod-- Gibt zurück:
- a new
MultiValuethat will storeStrings and have the given name and adderMethod. - Löst aus:
ArgumentIsNullException- if the given name is null.InvalidArgumentException- if the given name is blank.ArgumentIsNullException- if the given adderMethod is null.
-
add
Adds the given value to the currentMultiValue.- Parameter:
value-- Löst aus:
ArgumentIsNullException- if the given value is null.
-
clear
public void clear()Removes the elements of the currentClearable. -
getStoredValues
- Gibt zurück:
- the values of the current
MultiValue.
-
isEmpty
public boolean isEmpty()- Angegeben von:
isEmptyin SchnittstelleEmptinessRequestable- Gibt zurück:
- true if
EmptinessRequestabledoes not contain an element.
-
isMutable
public boolean isMutable()- Angegeben von:
isMutablein SchnittstelleMutabilityRequestable- Gibt zurück:
- true if the current
MutabilityRequestableis mutable.
-
remove
Removes the given value of the currentMultiValue.- Parameter:
value-- Löst aus:
ArgumentDoesNotContainElementException- if the currentMultiValuedoes not contain the given value.
-
removeAndGetRefLast
Removes and returns the last value of the currentMultiValue.- Gibt zurück:
- the last element of the current
MultiValue. - Löst aus:
EmptyArgumentException- if the currentMultiValueis empty.
-
removeLast
Removes the last value of the currentMultiValue.- Gibt zurück:
- the current
MultiValue. - Löst aus:
EmptyArgumentException- if the currentMultiValueis empty.
-
addOrChangeValue
Adds or change the given value to the currentAbstractValue.- Angegeben von:
addOrChangeValuein KlasseAbstractValue<V>- Parameter:
value-
-
fillUpAttributesInto
- Angegeben von:
fillUpAttributesIntoin SchnittstelleIProperty
-