Package eu.bandm.tools.umod.runtime
Class UncheckedCoPair<L,R>
java.lang.Object
eu.bandm.tools.umod.runtime.UncheckedCoPair<L,R>
- Type Parameters:
L- the type of the left alternativesR- the type of the right alternatives
- All Implemented Interfaces:
CoPair<L,,R> Serializable
- Direct Known Subclasses:
CheckedCoPair_L,CheckedCoPair_R
Implements "CoPair" operations, not guaranteeing any strictness.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUncheckedCoPair(boolean b, R right) Create a copair of the "right" alternative.UncheckedCoPair(CoPair<L, R> p) Create a copair with the same values as the prototype.UncheckedCoPair(L left) Create a copair of the "left" alternative. -
Method Summary
Modifier and TypeMethodDescriptionbooleanget_left()As usual.+/ static final long serialVersionUID = -6377989869262315836L; /** Return the stored value, if this instance realizes the left variant.Return the stored value, if this instance realizes the right variant.inthashCode()booleanisLeft()Return whether this instance realizes the left variant.voidSet this instance to realizes the left variant and set its value.voidSet this instance to realizes the right variant and set its value.toString()protected booleanxEquals(UncheckedCoPair<?, ?> o) Auxiliary method for comparison.
-
Field Details
-
Constructor Details
-
UncheckedCoPair
Create a copair of the "left" alternative.- Parameters:
left- the value stored in this copair.
-
UncheckedCoPair
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.
-
UncheckedCoPair
Create a copair with the same values as the prototype.- Parameters:
p- the prototype
-
-
Method Details
-
toString
-
isLeft
public boolean isLeft()Description copied from interface:CoPairReturn whether this instance realizes the left variant. -
get_left
Description copied from interface:CoPairAs usual.+/ static final long serialVersionUID = -6377989869262315836L; /** Return the stored value, if this instance realizes the left variant. -
get_right
Description copied from interface:CoPairReturn the stored value, if this instance realizes the right variant. -
set_left
Description copied from interface:CoPairSet this instance to realizes the left variant and set its value. -
set_right
Description copied from interface:CoPairSet this instance to realizes the right variant and set its value. -
xEquals
Auxiliary method for comparison.- Parameters:
o- the object to compare with.- Returns:
- whether this and the argument are equal.
-
equals
-
hashCode
public int hashCode()
-