Package eu.bandm.tools.umod.runtime
Class CheckedPair_R<L,R>
java.lang.Object
eu.bandm.tools.umod.runtime.UncheckedPair<L,R>
eu.bandm.tools.umod.runtime.CheckedPair_R<L,R>
- Type Parameters:
L- the type of the left componentsR- the type of the right components
- All Implemented Interfaces:
Pair<L,,R> Pair_checkedRight<L,,R> Serializable
Implements "Pair" operations and guarantees stricness of right side
component.
- See Also:
-
Field Summary
Fields inherited from interface eu.bandm.tools.umod.runtime.Pair
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionCheckedPair_R(L left, R right) Create an instance with the given left and right values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <A,B> List <CheckedPair_R<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 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, set_left, toString
-
Constructor Details
-
CheckedPair_R
Create an instance with the given left and right values.- Parameters:
left- the left valueright- the right value- Throws:
NullPointerException- if the right value is null
-
-
Method Details
-
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
Description copied from interface:PairDeliver a new instance with the given left value and the right value of this instance. -
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_R<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 right values is null
-
equals
- Overrides:
equalsin classUncheckedPair<L,R>
-