Package ch.nolix.system.element.property
Klasse MultiValue<V>
java.lang.Object
ch.nolix.system.element.property.BaseValue<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.BaseValue
specificationCreator
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Adds the given value to the currentMultiValue
.protected void
addOrChangeValue
(V value) Adds or change the given value to the currentBaseValue
.void
clear()
Removes the elements of the currentClearable
.void
fillUpAttributesInto
(ILinkedList<INode<?>> list) static MultiValue
<Integer> static MultiValue
<String> forStrings
(String name, Consumer<String> adderMethod) boolean
isEmpty()
boolean
void
Removes 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.BaseValue
addedOrChangedAttribute, getName
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAny
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.attributeapi.mandatoryattributeapi.INameHolder
getNameInQuotes, hasName, hasSameNameAs
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.MutabilityRequestable
isImmutable
-
Konstruktordetails
-
MultiValue
public MultiValue(String name, Consumer<V> adderMethod, Function<INode<?>, V> valueCreator, Function<V, INode<?>> specificationCreator) Creates a newMultiValue
with 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
MultiValue
that will storeInteger
s 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
MultiValue
that will storeString
s 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:
isEmpty
in SchnittstelleEmptinessRequestable
- Gibt zurück:
- true if
EmptinessRequestable
does not contain an element.
-
isMutable
public boolean isMutable()- Angegeben von:
isMutable
in SchnittstelleMutabilityRequestable
- Gibt zurück:
- true if the current
MutabilityRequestable
is mutable.
-
remove
Removes the given value of the currentMultiValue
.- Parameter:
value
-- Löst aus:
ArgumentDoesNotContainElementException
- if the currentMultiValue
does 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 currentMultiValue
is empty.
-
removeLast
Removes the last value of the currentMultiValue
.- Gibt zurück:
- the current
MultiValue
. - Löst aus:
EmptyArgumentException
- if the currentMultiValue
is empty.
-
addOrChangeValue
Adds or change the given value to the currentBaseValue
.- Angegeben von:
addOrChangeValue
in KlasseBaseValue<V>
- Parameter:
value
-
-
fillUpAttributesInto
- Angegeben von:
fillUpAttributesInto
in SchnittstelleIProperty
-