public sealed interface Tuple
permits Duad<T,U>, Heptad<T,U,V,W,X,Y,Z>, Hexad<T,U,V,W,X,Y>, Monad<T>, Octad<T,U,V,W,X,Y,Z,A>, Pentad<T,U,V,W,X>, Quad<T,U,V,W>, Triad<T,U,V>, Unit
Tuple is a finite-ordered list of elements.
- Since:
- 1.0.0
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> @Unmodifiable @NotNull List<T>Returns an unmodifiable list of all the values in the duad.static <T> @Unmodifiable @NotNull List<T>asList(@NotNull Heptad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T> heptad) Returns an unmodifiable list of all the values in the heptad.static <T> @Unmodifiable @NotNull List<T>asList(@NotNull Hexad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T> hexad) Returns an unmodifiable list of all the values in the hexad.static <T> @Unmodifiable @NotNull List<T>Returns an unmodifiable list of the value in the monad.static <T> @Unmodifiable @NotNull List<T>asList(@NotNull Octad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T> octad) Returns an unmodifiable list of all the values in the octad.static <T> @Unmodifiable @NotNull List<T>Returns an unmodifiable list of all the values in the pentad.static <T> @Unmodifiable @NotNull List<T>Returns an unmodifiable list of all the values in the quad.static <T> @Unmodifiable @NotNull List<T>Returns an unmodifiable list of all the values in the triad.static <T> @Unmodifiable @NotNull List<? super T>Returns an unmodifiable list based on the tuple that is inputted.static <T> @Unmodifiable @NotNull List<T>Returns an empty unmodifiable list.static @NotNull Unitempty()Returns an empty tuple instance.static <T> @NotNull Monad<T>of(T first) Returns a monad instance.static <T,U> @NotNull Duad<T, U> of(T first, U second) Returns a duad instance.static <T,U, V> @NotNull Triad<T, U, V> of(T first, U second, V third) Returns a triad instance.static <T,U, V, W>
@NotNull Quad<T,U, V, W> of(T first, U second, V third, W fourth) Returns a quad instance.static <T,U, V, W, X>
@NotNull Pentad<T,U, V, W, X> of(T first, U second, V third, W fourth, X fifth) Returns a pentad instance.static <T,U, V, W, X, Y>
@NotNull Hexad<T,U, V, W, X, Y> of(T first, U second, V third, W fourth, X fifth, Y sixth) Returns a hexad instance.static <T,U, V, W, X, Y, Z>
@NotNull Heptad<T,U, V, W, X, Y, Z> of(T first, U second, V third, W fourth, X fifth, Y sixth, Z seventh) Returns a heptad instance.static <T,U, V, W, X, Y, Z, A>
@NotNull Octad<T,U, V, W, X, Y, Z, A> of(T first, U second, V third, W fourth, X fifth, Y sixth, Z seventh, A eighth) Returns a octad instance.
-
Method Details
-
asList
Returns an unmodifiable list based on the tuple that is inputted.- Type Parameters:
T- the type of the return value- Parameters:
tuple- the tuple to be converted- Returns:
- an unmodifiable list
- Since:
- 1.0.0
-
asList
@Contract(pure=true) @NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Unit unit) Returns an empty unmodifiable list.- Type Parameters:
T- the type of the return value- Parameters:
unit- the unit to be converted- Returns:
- an empty unmodifiable list
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Monad<? extends T> monad) Returns an unmodifiable list of the value in the monad.- Type Parameters:
T- the type of the return value- Parameters:
monad- the monad to be converted- Returns:
- an unmodifiable list of the value in the monad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Duad<? extends T, ? extends T> duad) Returns an unmodifiable list of all the values in the duad.- Type Parameters:
T- the type of the return value- Parameters:
duad- the duad to be converted- Returns:
- an unmodifiable list of all the values in the duad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Triad<? extends T, ? extends T, ? extends T> triad) Returns an unmodifiable list of all the values in the triad.- Type Parameters:
T- the type of the return value- Parameters:
triad- the triad to be converted- Returns:
- an unmodifiable list of all the values in the triad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Quad<? extends T, ? extends T, ? extends T, ? extends T> quad) Returns an unmodifiable list of all the values in the quad.- Type Parameters:
T- the type of the return value- Parameters:
quad- the quad to be converted- Returns:
- an unmodifiable list of all the values in the quad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Pentad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T> pentad) Returns an unmodifiable list of all the values in the pentad.- Type Parameters:
T- the type of the return value- Parameters:
pentad- the pentad to be converted- Returns:
- an unmodifiable list of all the values in the pentad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Hexad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T> hexad) Returns an unmodifiable list of all the values in the hexad.- Type Parameters:
T- the type of the return value- Parameters:
hexad- the duad to be converted- Returns:
- an unmodifiable list of all the values in the hexad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Heptad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T> heptad) Returns an unmodifiable list of all the values in the heptad.- Type Parameters:
T- the type of the return value- Parameters:
heptad- the heptad to be converted- Returns:
- an unmodifiable list of all the values in the heptad
- Since:
- 1.0.0
-
asList
@NotNull static <T> @Unmodifiable @NotNull List<T> asList(@NotNull @NotNull Octad<? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T, ? extends T> octad) Returns an unmodifiable list of all the values in the octad.- Type Parameters:
T- the type of the return value- Parameters:
octad- the octad to be converted- Returns:
- an unmodifiable list of all the values in the octad
- Since:
- 1.0.0
-
empty
Returns an empty tuple instance.- Returns:
- an empty tuple instance
- Since:
- 1.0.0
-
of
Returns a monad instance.- Type Parameters:
T- the type of thefirstvalue- Returns:
- a monad instance
- Since:
- 1.0.0
-
of
Returns a duad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalue- Returns:
- a duad instance
- Since:
- 1.0.0
-
of
@Contract("_, _, _ -> new") @NotNull static <T,U, @NotNull Triad<T,V> U, ofV> (T first, U second, V third) Returns a triad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalueV- the type of thethirdvalue- Returns:
- a triad instance
- Since:
- 1.0.0
-
of
@Contract("_, _, _, _ -> new") @NotNull static <T,U, @NotNull Quad<T,V, W> U, ofV, W> (T first, U second, V third, W fourth) Returns a quad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalueV- the type of thethirdvalueW- the type of thefourthvalue- Returns:
- a quad instance
- Since:
- 1.0.0
-
of
@Contract("_, _, _, _, _ -> new") @NotNull static <T,U, @NotNull Pentad<T,V, W, X> U, ofV, W, X> (T first, U second, V third, W fourth, X fifth) Returns a pentad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalueV- the type of thethirdvalueW- the type of thefourthvalueX- the type of thefifthvalue- Returns:
- a pentad instance
- Since:
- 1.0.0
-
of
@Contract("_, _, _, _, _, _ -> new") @NotNull static <T,U, @NotNull Hexad<T,V, W, X, Y> U, ofV, W, X, Y> (T first, U second, V third, W fourth, X fifth, Y sixth) Returns a hexad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalueV- the type of thethirdvalueW- the type of thefourthvalueX- the type of thefifthvalueY- the type of thesixthvalue- Returns:
- a hexad instance
- Since:
- 1.0.0
-
of
@Contract("_, _, _, _, _, _, _ -> new") @NotNull static <T,U, @NotNull Heptad<T,V, W, X, Y, Z> U, ofV, W, X, Y, Z> (T first, U second, V third, W fourth, X fifth, Y sixth, Z seventh) Returns a heptad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalueV- the type of thethirdvalueW- the type of thefourthvalueX- the type of thefifthvalueY- the type of thesixthvalueZ- the type of theseventhvalue- Returns:
- a heptad instance
- Since:
- 1.0.0
-
of
@Contract("_, _, _, _, _, _, _, _ -> new") @NotNull static <T,U, @NotNull Octad<T,V, W, X, Y, Z, A> U, ofV, W, X, Y, Z, A> (T first, U second, V third, W fourth, X fifth, Y sixth, Z seventh, A eighth) Returns a octad instance.- Type Parameters:
T- the type of thefirstvalueU- the type of thesecondvalueV- the type of thethirdvalueW- the type of thefourthvalueX- the type of thefifthvalueY- the type of thesixthvalueZ- the type of theseventhvalueA- the type of theeighthvalue- Returns:
- a octad instance
- Since:
- 1.0.0
-