Triplet

public final class Triplet<A extends Message, B, C> extends Tuple implements Element.AValue<T>, Element.BValue<T>, Element.CValue<T>

A tuple with three elements.

The first element must be a non-default Message and not Empty.

Other two can be Message, Optional or Either.

Parameters

<A>

the type of the first element

<B>

the type of the second element

<C>

the type of the third element

Functions

Link copied to clipboard
public A getA()
Obtains the first element of the tuple.
Link copied to clipboard
public B getB()
Obtains the second element of the tuple.
Link copied to clipboard
public C getC()
Obtains the third element of the tuple.
Link copied to clipboard
public static Triplet<A, B, C> of<A extends Message, B extends Message, C extends Message>(A a, B b, C c)
Creates new triplet with the passed values.
Link copied to clipboard
public static Triplet<A, B, Optional<C>> withNullable<A extends Message, B extends Message, C extends Message>(A a, B b, C c)
Creates a triplet with the last element optional.
Link copied to clipboard
public static Triplet<A, Optional<B>, Optional<C>> withNullable2<A extends Message, B extends Message, C extends Message>(A a, B b, C c)
Creates a new triplet with optional second and third elements.

Inherited functions

Link copied to clipboard
public final boolean equals(Object obj)
Link copied to clipboard
public void forEach(Consumer<? extends Object> action)
Link copied to clipboard
protected final Object get(int index)
Obtains a value at the specified index.
Link copied to clipboard
public final int hashCode()
Link copied to clipboard
public final Iterator<Message> iterator()
public abstract Iterator<T> iterator()
Link copied to clipboard