Package com.vladris.maki
Class Variant8<T1,T2,T3,T4,T5,T6,T7,T8>
- java.lang.Object
-
- com.vladris.maki.VariantBase
-
- com.vladris.maki.Variant8<T1,T2,T3,T4,T5,T6,T7,T8>
-
- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.
public class Variant8<T1,T2,T3,T4,T5,T6,T7,T8> extends VariantBase
Represents a 8-type discriminate union.class Sample { static void Example() { // A variant can hold a value of any of its generic types Variant3<Integer, String, Double> variant = new Variant3<Integer, String, Double>(42); // Can reassign variant with another of its generic types variant.set("Hello world!"); // Check the type of the value currently inhabiting the variant if (variant.is(String.class)) { System.out.println("The string is: " + variant.<String>get()); } variant.set(0.5); // The right function will get picked depending on the value // currently inhabiting the variant variant.apply( (i) -> System.out.println(i + 1), (s) -> System.out.println(s + "!"), (d) -> System.out.println(d / 2)); } }
-
-
Constructor Summary
Constructors Constructor Description Variant8(T1 item, TypeGuard1... guard)Creates a new Variant instance from an item of typeT1.Variant8(T2 item, TypeGuard2... guard)Creates a new Variant instance from an item of typeT2.Variant8(T3 item, TypeGuard3... guard)Creates a new Variant instance from an item of typeT3.Variant8(T4 item, TypeGuard4... guard)Creates a new Variant instance from an item of typeT4.Variant8(T5 item, TypeGuard5... guard)Creates a new Variant instance from an item of typeT5.Variant8(T6 item, TypeGuard6... guard)Creates a new Variant instance from an item of typeT6.Variant8(T7 item, TypeGuard7... guard)Creates a new Variant instance from an item of typeT7.Variant8(T8 item, TypeGuard8... guard)Creates a new Variant instance from an item of typeT8.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(java.util.function.Consumer<T1> consumer1, java.util.function.Consumer<T2> consumer2, java.util.function.Consumer<T3> consumer3, java.util.function.Consumer<T4> consumer4, java.util.function.Consumer<T5> consumer5, java.util.function.Consumer<T6> consumer6, java.util.function.Consumer<T7> consumer7, java.util.function.Consumer<T8> consumer8)Applies one of the given consumers to the variant depending on the type currently inhabiting the variant.<R> Rapply(java.util.function.Function<T1,R> func1, java.util.function.Function<T2,R> func2, java.util.function.Function<T3,R> func3, java.util.function.Function<T4,R> func4, java.util.function.Function<T5,R> func5, java.util.function.Function<T6,R> func6, java.util.function.Function<T7,R> func7, java.util.function.Function<T8,R> func8)Applies one of the given functions to the variant depending on the type currently inhabiting the variant.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T1 item, TypeGuard1... guard)Creates a new Variant given an item of typeT1.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T2 item, TypeGuard2... guard)Creates a new Variant given an item of typeT2.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T3 item, TypeGuard3... guard)Creates a new Variant given an item of typeT3.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T4 item, TypeGuard4... guard)Creates a new Variant given an item of typeT4.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T5 item, TypeGuard5... guard)Creates a new Variant given an item of typeT5.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T6 item, TypeGuard6... guard)Creates a new Variant given an item of typeT6.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T7 item, TypeGuard7... guard)Creates a new Variant given an item of typeT7.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make(T8 item, TypeGuard8... guard)Creates a new Variant given an item of typeT8.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make1(T1 item)Creates a new Variant given an item of typeT1explicitly placed at index 0.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make2(T2 item)Creates a new Variant given an item of typeT2explicitly placed at index 1.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make3(T3 item)Creates a new Variant given an item of typeT3explicitly placed at index 2.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make4(T4 item)Creates a new Variant given an item of typeT4explicitly placed at index 3.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make5(T5 item)Creates a new Variant given an item of typeT5explicitly placed at index 4.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make6(T6 item)Creates a new Variant given an item of typeT6explicitly placed at index 5.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make7(T7 item)Creates a new Variant given an item of typeT7explicitly placed at index 6.static <T1,T2,T3,T4,T5,T6,T7,T8>
Variant8<T1,T2,T3,T4,T5,T6,T7,T8>make8(T8 item)Creates a new Variant given an item of typeT8explicitly placed at index 7.<U1,U2,U3,U4,U5,U6,U7,U8>
Variant8<U1,U2,U3,U4,U5,U6,U7,U8>map(java.util.function.Function<T1,U1> func1, java.util.function.Function<T2,U2> func2, java.util.function.Function<T3,U3> func3, java.util.function.Function<T4,U4> func4, java.util.function.Function<T5,U5> func5, java.util.function.Function<T6,U6> func6, java.util.function.Function<T7,U7> func7, java.util.function.Function<T8,U8> func8)Applies one of the given functions to the variant depending on the type currently inhabiting the variant.voidset(T1 item, TypeGuard1... guard)Assigns an item of typeT1to the variant.voidset(T2 item, TypeGuard2... guard)Assigns an item of typeT2to the variant.voidset(T3 item, TypeGuard3... guard)Assigns an item of typeT3to the variant.voidset(T4 item, TypeGuard4... guard)Assigns an item of typeT4to the variant.voidset(T5 item, TypeGuard5... guard)Assigns an item of typeT5to the variant.voidset(T6 item, TypeGuard6... guard)Assigns an item of typeT6to the variant.voidset(T7 item, TypeGuard7... guard)Assigns an item of typeT7to the variant.voidset(T8 item, TypeGuard8... guard)Assigns an item of typeT8to the variant.voidset1(T1 item)Explicitly assigns an item of typeT1at index 0.voidset2(T2 item)Explicitly assigns an item of typeT2at index 1.voidset3(T3 item)Explicitly assigns an item of typeT3at index 2.voidset4(T4 item)Explicitly assigns an item of typeT4at index 3.voidset5(T5 item)Explicitly assigns an item of typeT5at index 4.voidset6(T6 item)Explicitly assigns an item of typeT6at index 5.voidset7(T7 item)Explicitly assigns an item of typeT7at index 6.voidset8(T8 item)Explicitly assigns an item of typeT8at index 7.
-
-
-
Constructor Detail
-
Variant8
public Variant8(T1 item, TypeGuard1... guard)
Creates a new Variant instance from an item of typeT1.- Parameters:
item- Item of typeT1.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T2 item, TypeGuard2... guard)
Creates a new Variant instance from an item of typeT2.- Parameters:
item- Item of typeT2.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T3 item, TypeGuard3... guard)
Creates a new Variant instance from an item of typeT3.- Parameters:
item- Item of typeT3.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T4 item, TypeGuard4... guard)
Creates a new Variant instance from an item of typeT4.- Parameters:
item- Item of typeT4.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T5 item, TypeGuard5... guard)
Creates a new Variant instance from an item of typeT5.- Parameters:
item- Item of typeT5.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T6 item, TypeGuard6... guard)
Creates a new Variant instance from an item of typeT6.- Parameters:
item- Item of typeT6.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T7 item, TypeGuard7... guard)
Creates a new Variant instance from an item of typeT7.- Parameters:
item- Item of typeT7.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
Variant8
public Variant8(T8 item, TypeGuard8... guard)
Creates a new Variant instance from an item of typeT8.- Parameters:
item- Item of typeT8.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
-
Method Detail
-
set
public void set(T1 item, TypeGuard1... guard)
Assigns an item of typeT1to the variant.- Parameters:
item- Item of typeT1.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T2 item, TypeGuard2... guard)
Assigns an item of typeT2to the variant.- Parameters:
item- Item of typeT2.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T3 item, TypeGuard3... guard)
Assigns an item of typeT3to the variant.- Parameters:
item- Item of typeT3.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T4 item, TypeGuard4... guard)
Assigns an item of typeT4to the variant.- Parameters:
item- Item of typeT4.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T5 item, TypeGuard5... guard)
Assigns an item of typeT5to the variant.- Parameters:
item- Item of typeT5.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T6 item, TypeGuard6... guard)
Assigns an item of typeT6to the variant.- Parameters:
item- Item of typeT6.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T7 item, TypeGuard7... guard)
Assigns an item of typeT7to the variant.- Parameters:
item- Item of typeT7.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set
public void set(T8 item, TypeGuard8... guard)
Assigns an item of typeT8to the variant.- Parameters:
item- Item of typeT8.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.
-
set1
public void set1(T1 item)
Explicitly assigns an item of typeT1at index 0.- Parameters:
item- Item of typeT1.
-
set2
public void set2(T2 item)
Explicitly assigns an item of typeT2at index 1.- Parameters:
item- Item of typeT2.
-
set3
public void set3(T3 item)
Explicitly assigns an item of typeT3at index 2.- Parameters:
item- Item of typeT3.
-
set4
public void set4(T4 item)
Explicitly assigns an item of typeT4at index 3.- Parameters:
item- Item of typeT4.
-
set5
public void set5(T5 item)
Explicitly assigns an item of typeT5at index 4.- Parameters:
item- Item of typeT5.
-
set6
public void set6(T6 item)
Explicitly assigns an item of typeT6at index 5.- Parameters:
item- Item of typeT6.
-
set7
public void set7(T7 item)
Explicitly assigns an item of typeT7at index 6.- Parameters:
item- Item of typeT7.
-
set8
public void set8(T8 item)
Explicitly assigns an item of typeT8at index 7.- Parameters:
item- Item of typeT8.
-
apply
public <R> R apply(java.util.function.Function<T1,R> func1, java.util.function.Function<T2,R> func2, java.util.function.Function<T3,R> func3, java.util.function.Function<T4,R> func4, java.util.function.Function<T5,R> func5, java.util.function.Function<T6,R> func6, java.util.function.Function<T7,R> func7, java.util.function.Function<T8,R> func8)
Applies one of the given functions to the variant depending on the type currently inhabiting the variant.- Type Parameters:
R- Represents the return type of all functions.- Parameters:
func1- Function to apply on typeT1.func2- Function to apply on typeT2.func3- Function to apply on typeT3.func4- Function to apply on typeT4.func5- Function to apply on typeT5.func6- Function to apply on typeT6.func7- Function to apply on typeT7.func8- Function to apply on typeT8.- Returns:
- Result of applying function.
-
apply
public void apply(java.util.function.Consumer<T1> consumer1, java.util.function.Consumer<T2> consumer2, java.util.function.Consumer<T3> consumer3, java.util.function.Consumer<T4> consumer4, java.util.function.Consumer<T5> consumer5, java.util.function.Consumer<T6> consumer6, java.util.function.Consumer<T7> consumer7, java.util.function.Consumer<T8> consumer8)
Applies one of the given consumers to the variant depending on the type currently inhabiting the variant.- Parameters:
consumer1- Consumer to apply on typeT1.consumer2- Consumer to apply on typeT2.consumer3- Consumer to apply on typeT3.consumer4- Consumer to apply on typeT4.consumer5- Consumer to apply on typeT5.consumer6- Consumer to apply on typeT6.consumer7- Consumer to apply on typeT7.consumer8- Consumer to apply on typeT8.
-
map
public <U1,U2,U3,U4,U5,U6,U7,U8> Variant8<U1,U2,U3,U4,U5,U6,U7,U8> map(java.util.function.Function<T1,U1> func1, java.util.function.Function<T2,U2> func2, java.util.function.Function<T3,U3> func3, java.util.function.Function<T4,U4> func4, java.util.function.Function<T5,U5> func5, java.util.function.Function<T6,U6> func6, java.util.function.Function<T7,U7> func7, java.util.function.Function<T8,U8> func8)
Applies one of the given functions to the variant depending on the type currently inhabiting the variant.- Type Parameters:
U1- Represents the return type offunc1.U2- Represents the return type offunc2.U3- Represents the return type offunc3.U4- Represents the return type offunc4.U5- Represents the return type offunc5.U6- Represents the return type offunc6.U7- Represents the return type offunc7.U8- Represents the return type offunc8.- Parameters:
func1- Function to apply on typeT1.func2- Function to apply on typeT2.func3- Function to apply on typeT3.func4- Function to apply on typeT4.func5- Function to apply on typeT5.func6- Function to apply on typeT6.func7- Function to apply on typeT7.func8- Function to apply on typeT8.- Returns:
- Variant containing the result of applying the selected function.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T1 item, TypeGuard1... guard)
Creates a new Variant given an item of typeT1.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT1.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T2 item, TypeGuard2... guard)
Creates a new Variant given an item of typeT2.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT2.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T3 item, TypeGuard3... guard)
Creates a new Variant given an item of typeT3.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT3.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T4 item, TypeGuard4... guard)
Creates a new Variant given an item of typeT4.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT4.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T5 item, TypeGuard5... guard)
Creates a new Variant given an item of typeT5.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT5.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T6 item, TypeGuard6... guard)
Creates a new Variant given an item of typeT6.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT6.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T7 item, TypeGuard7... guard)
Creates a new Variant given an item of typeT7.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT7.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make(T8 item, TypeGuard8... guard)
Creates a new Variant given an item of typeT8.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT8.guard- TypeGuards are used to disambiguate methods after type erasure, no argument should be supplied.- Returns:
- A Variant containing the given item.
-
make1
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make1(T1 item)
Creates a new Variant given an item of typeT1explicitly placed at index 0.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT1.- Returns:
- A Variant containing the given item at index 0.
-
make2
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make2(T2 item)
Creates a new Variant given an item of typeT2explicitly placed at index 1.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT2.- Returns:
- A Variant containing the given item at index 1.
-
make3
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make3(T3 item)
Creates a new Variant given an item of typeT3explicitly placed at index 2.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT3.- Returns:
- A Variant containing the given item at index 2.
-
make4
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make4(T4 item)
Creates a new Variant given an item of typeT4explicitly placed at index 3.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT4.- Returns:
- A Variant containing the given item at index 3.
-
make5
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make5(T5 item)
Creates a new Variant given an item of typeT5explicitly placed at index 4.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT5.- Returns:
- A Variant containing the given item at index 4.
-
make6
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make6(T6 item)
Creates a new Variant given an item of typeT6explicitly placed at index 5.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT6.- Returns:
- A Variant containing the given item at index 5.
-
make7
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make7(T7 item)
Creates a new Variant given an item of typeT7explicitly placed at index 6.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT7.- Returns:
- A Variant containing the given item at index 6.
-
make8
public static <T1,T2,T3,T4,T5,T6,T7,T8> Variant8<T1,T2,T3,T4,T5,T6,T7,T8> make8(T8 item)
Creates a new Variant given an item of typeT8explicitly placed at index 7.- Type Parameters:
T1- Represents the variants first type.T2- Represents the variants second type.T3- Represents the variants third type.T4- Represents the variants fourth type.T5- Represents the variants fifth type.T6- Represents the variants sixth type.T7- Represents the variants seventh type.T8- Represents the variants eighth type.- Parameters:
item- Item of typeT8.- Returns:
- A Variant containing the given item at index 7.
-
-