Package eu.bandm.tools.umod.runtime
Class CheckedCoPair_LR<L,R>
java.lang.Object
eu.bandm.tools.umod.runtime.UncheckedCoPair<L,R>
eu.bandm.tools.umod.runtime.CheckedCoPair_L<L,R>
eu.bandm.tools.umod.runtime.CheckedCoPair_LR<L,R>
- Type Parameters:
L- the type of the left variantR- the type of the right variant
- All Implemented Interfaces:
Nullfree,CoPair<L,,R> CoPair_checkedLeft<L,,R> CoPair_checkedRight<L,,R> Serializable
public class CheckedCoPair_LR<L,R>
extends CheckedCoPair_L<L,R>
implements CoPair_checkedRight<L,R>, Nullfree
Implements "CoPair" operations and guarantees strictness of both variants.
- See Also:
-
Field Summary
Fields inherited from class eu.bandm.tools.umod.runtime.UncheckedCoPair
isLeft, left, right -
Constructor Summary
ConstructorsConstructorDescriptionCheckedCoPair_LR(boolean b, R right) Create a copair of the "right" alternative.CheckedCoPair_LR(CoPair<L, R> p) Create a copair with the same values as the prototype.CheckedCoPair_LR(L left) Create a copair of the "left" alternative. -
Method Summary
Methods inherited from class eu.bandm.tools.umod.runtime.CheckedCoPair_L
set_leftMethods inherited from class eu.bandm.tools.umod.runtime.UncheckedCoPair
get_left, get_right, hashCode, isLeft, toString, xEquals
-
Constructor Details
-
CheckedCoPair_LR
Create a copair of the "left" alternative.- Parameters:
left- the value stored in this copair.- Throws:
NullPointerException- if the argument is null.
-
CheckedCoPair_LR
Create a copair of the "right" alternative.- Parameters:
b- a marker parameter which chooses the right alternative. Can have arbitrary value.right- the value stored in this copair.- Throws:
NullPointerException- if the argument is null.
-
CheckedCoPair_LR
Create a copair with the same values as the prototype.- Parameters:
p- the prototype- Throws:
NullPointerException- if the argument has the null value.
-
-
Method Details
-
set_right
Description copied from interface:CoPairSet this instance to realizes the right variant and set its value. -
equals
- Overrides:
equalsin classCheckedCoPair_L<L,R>
-