Class Pair<X,Y>
java.lang.Object
com.supermartijn642.fusion.api.util.Pair<X,Y>
Created 23/07/2022 by SuperMartijn642
-
Method Summary
Modifier and TypeMethodDescriptionvoidapply(BiConsumer<X, Y> consumer) Applies the given consumer to the values held by this pair.boolean<S> SflatMap(BiFunction<X, Y, S> mapper) Maps the values held by this pair to an object of typePair.inthashCode()left()<R,S> Pair<R, S> Applies the respective mapper to the left or right values.Applies the given mapper to the left value.Applies the given mapper to the right value.static <X,Y> Pair<X, Y> of(X left, Y right) right()
-
Method Details
-
of
-
left
-
right
-
mapLeft
Applies the given mapper to the left value. -
mapRight
Applies the given mapper to the right value. -
map
Applies the respective mapper to the left or right values. -
flatMap
Maps the values held by this pair to an object of typePair. -
apply
Applies the given consumer to the values held by this pair. -
equals
-
hashCode
public int hashCode()
-