Package eu.bandm.tools.umod.runtime
Class CheckedPair_LR<L,R>
java.lang.Object
eu.bandm.tools.umod.runtime.UncheckedPair<L,R>
eu.bandm.tools.umod.runtime.CheckedPair_LR<L,R>
- Type Parameters:
L- the type of the left componentsR- the type of the right components
- All Implemented Interfaces:
Nullfree,Pair<L,,R> Pair_checkedLeft<L,,R> Pair_checkedRight<L,,R> Serializable
public class CheckedPair_LR<L,R>
extends UncheckedPair<L,R>
implements Pair_checkedRight<L,R>, Pair_checkedLeft<L,R>, Nullfree
Implements "Pair" operations and guarantees stricness of both components.
ATTENTION "
ATTENTION "
extends CheckedPair_L<L,R>" not possible because
"fromIterables()" would have incompatible return type.- See Also:
-
Field Summary
Fields inherited from interface eu.bandm.tools.umod.runtime.Pair
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionCheckedPair_LR(L left, R right) Create an instance with the given left and right values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <A,B> List <CheckedPair_LR<A, B>> fromIterables(Iterable<A> left, Iterable<B> right, Class<A> lclass, Class<B> rclass) Create a list of instances which contains all possible combinations of the given values.voidChange the left value of this instance.voidChange the right value of this instance.Deliver a new instance with the given left value and the right value of this instance.with_right(R r) Deliver a new instance with the given right value and the left value of this instance.Methods inherited from class eu.bandm.tools.umod.runtime.UncheckedPair
fromIterables_unchecked, get_left, get_right, hashCode, toString
-
Constructor Details
-
CheckedPair_LR
Create an instance with the given left and right values.- Parameters:
left- the left valueright- the right value- Throws:
NullPointerException- if a value is null
-
-
Method Details
-
set_left
Change the left value of this instance.- Specified by:
set_leftin interfacePair<L,R> - Overrides:
set_leftin classUncheckedPair<L,R> - Parameters:
l- the new left value.- Throws:
NullPointerException- if the value is null
-
set_right
Change the right value of this instance.- Specified by:
set_rightin interfacePair<L,R> - Overrides:
set_rightin classUncheckedPair<L,R> - Parameters:
r- the new right value.- Throws:
NullPointerException- if the value is null
-
with_left
Deliver a new instance with the given left value and the right value of this instance.- Specified by:
with_leftin interfacePair<L,R> - Overrides:
with_leftin classUncheckedPair<L,R> - Parameters:
l- the new left value.- Returns:
- a new instance.
- Throws:
NullPointerException- if the value is null
-
with_right
Deliver a new instance with the given right value and the left value of this instance.- Specified by:
with_rightin interfacePair<L,R> - Overrides:
with_rightin classUncheckedPair<L,R> - Parameters:
r- the new right value.- Returns:
- a new instance.
- Throws:
NullPointerException- if the value is null
-
fromIterables
public static <A,B> List<CheckedPair_LR<A,B>> fromIterables(Iterable<A> left, Iterable<B> right, Class<A> lclass, Class<B> rclass) Create a list of instances which contains all possible combinations of the given values.- Type Parameters:
A- the type of the left valuesB- the type of the left values- Parameters:
left- the left valuesright- the right valueslclass- the type of the left valuesrclass- the type of the left values- Returns:
- the list of all combinations
- Throws:
NullPointerException- if one of the values is null
-
equals
- Overrides:
equalsin classUncheckedPair<L,R>
-