Package no.digipost.util
Class ChainableAssignment<V,C>
- java.lang.Object
-
- no.digipost.util.ChainableAssignment<V,C>
-
- Type Parameters:
C- The "chain" type, which is returned from each call tois(Object)to allow chained invocation.
- All Implemented Interfaces:
Consumer<V>,Supplier<V>,Assignment<V>,ViewableAsOptional<V>,ViewableAsOptional.Single<V>
public final class ChainableAssignment<V,C> extends Object implements Assignment<V>
AnAssignmentwith the added ability to chain several assignments withis(Object).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface no.digipost.util.ViewableAsOptional
ViewableAsOptional.Single<V>, ViewableAsOptional.TooManyElements
-
-
Constructor Summary
Constructors Constructor Description ChainableAssignment(Assignment<V> assignment, C chainReturnObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget()Cis(V value)Assign the given value and return object to allow chained invocation.voidset(V value)Assign the given value.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface no.digipost.util.Assignment
accept, chainableWith
-
Methods inherited from interface no.digipost.util.ViewableAsOptional.Single
toOptional
-
-
-
-
Constructor Detail
-
ChainableAssignment
public ChainableAssignment(Assignment<V> assignment, C chainReturnObject)
-
-
Method Detail
-
is
public C is(V value)
Assign the given value and return object to allow chained invocation.- Parameters:
value- the value to assign- Returns:
- the object to allow further chained invocation
-
set
public void set(V value)
Description copied from interface:AssignmentAssign the given value.- Specified by:
setin interfaceAssignment<V>- Parameters:
value- the value to assign.
-
-