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