Module jp.cafebabe.birthmarks
Package jp.cafebabe.birthmarks.entities
Class Couple<L extends Serializable,R extends Serializable>
- java.lang.Object
-
- jp.cafebabe.birthmarks.entities.Couple<L,R>
-
- All Implemented Interfaces:
Serializable
public class Couple<L extends Serializable,R extends Serializable> extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(BiConsumer<L,R> action)booleanequals(Object other)booleanfilter(BiPredicate<L,R> predicate)inthashCode()Lleft()<F> Fmap(BiFunction<L,R,F> mapper)<L2 extends Serializable,R2 extends Serializable>
Couple<L2,R2>map(Function<L,L2> leftMapper, Function<R,R2> rightMapper)static <L extends Serializable,R extends Serializable>
Couple<L,R>of(L left, R right)Rright()Couple<R,L>swap()
-
-
-
Method Detail
-
left
public L left()
-
right
public R right()
-
of
public static <L extends Serializable,R extends Serializable> Couple<L,R> of(L left, R right)
-
apply
public void apply(BiConsumer<L,R> action)
-
filter
public boolean filter(BiPredicate<L,R> predicate)
-
map
public <F> F map(BiFunction<L,R,F> mapper)
-
map
public <L2 extends Serializable,R2 extends Serializable> Couple<L2,R2> map(Function<L,L2> leftMapper, Function<R,R2> rightMapper)
-
-