Quartet

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

A tuple with four elements.

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

Other three 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

<D>

the type of the fourth 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 D getD()
Obtains the fourth element of the tuple.
Link copied to clipboard
public static Quartet<A, B, C, D> of<A extends Message, B extends Message, C extends Message, D extends Message>(A a, B b, C c, D d)
Creates a quartet with all values present.
Link copied to clipboard
public static Quartet<A, B, C, Optional<D>> withNullable<A extends Message, B extends Message, C extends Message, D extends Message>(A a, B b, C c, D d)
Creates a quartet with one optional value.
Link copied to clipboard
public static Quartet<A, B, Optional<C>, Optional<D>> withNullable2<A extends Message, B extends Message, C extends Message, D extends Message>(A a, B b, C c, D d)
Creates a quartet with two optional values.
Link copied to clipboard
public static Quartet<A, Optional<B>, Optional<C>, Optional<D>> withNullable3<A extends Message, B extends Message, C extends Message, D extends Message>(A a, B b, C c, D d)
Creates a quartet with three optional values.

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