Package eu.bandm.tools.umod.runtime
Interface Pair<L,R>
- Type Parameters:
L- the type of the left componentsR- the type of the right components
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
Pair_checkedLeft<L,,R> Pair_checkedRight<L,R>
- All Known Implementing Classes:
CheckedPair_L,CheckedPair_LR,CheckedPair_R,UncheckedPair
Interface defining pair operations.
A pair represents the combination of two values.
These can have the same or different types.
Implementing instances are mutable objects.
Here no strictness is implied, but some subclasses do.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionget_left()Return the left component of this pair.Return the right component of this pair.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.
-
Field Details
-
serialVersionUID
static final long serialVersionUIDAs usual.- See Also:
-
-
Method Details
-
get_left
Return the left component of this pair.- Returns:
- the left component of this pair.
-
get_right
Return the right component of this pair.- Returns:
- the right component of this pair.
-
with_left
Deliver a new instance with the given left value and the right value of this instance.- Parameters:
l- the new left value.- Returns:
- a new instance.
-
with_right
Deliver a new instance with the given right value and the left value of this instance.- Parameters:
r- the new right value.- Returns:
- a new instance.
-
set_left
Change the left value of this instance.- Parameters:
l- the new left value.
-
set_right
Change the right value of this instance.- Parameters:
r- the new right value.
-