public static class HCReader.WithVars
extends java.lang.Object
ObjectReader factory that creates reader that start by reading variables. The created readers
usually create objects by passing some of these variables to their constructors.| Modifier and Type | Method | Description |
|---|---|---|
<T> ObjectReader<T> |
createFrom2Vars(Int2Constructor<T> constructor,
java.lang.String var1,
java.lang.String var2) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFrom3Vars(Int3Constructor<T> constructor,
java.lang.String var1,
java.lang.String var2,
java.lang.String var3) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFrom4Vars(Int4Constructor<T> constructor,
java.lang.String var1,
java.lang.String var2,
java.lang.String var3,
java.lang.String var4) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFrom5Vars(Int5Constructor<T> constructor,
java.lang.String var1,
java.lang.String var2,
java.lang.String var3,
java.lang.String var4,
java.lang.String var5) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFrom6Vars(Int6Constructor<T> constructor,
java.lang.String var1,
java.lang.String var2,
java.lang.String var3,
java.lang.String var4,
java.lang.String var5,
java.lang.String var6) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFrom7Vars(Int7Constructor<T> constructor,
java.lang.String var1,
java.lang.String var2,
java.lang.String var3,
java.lang.String var4,
java.lang.String var5,
java.lang.String var6,
java.lang.String var7) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFromVar(java.util.function.Function<java.lang.Integer,T> constructor,
java.lang.String varName) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
createFromVars(IntArrayConstructor<T> constructor,
java.lang.String... vars) |
Creates a new
ObjectReader that creates objects with the given constructor. |
<T> ObjectReader<T> |
of(java.util.function.Function<Context,T> constructor) |
Creates a new
ObjectReader that first read some variables before calling the given function. |
public <T> ObjectReader<T> of(java.util.function.Function<Context,T> constructor)
ObjectReader that first read some variables before calling the given function.T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instances. This function may access the variables that this
factory providesObjectReaderpublic <T> ObjectReader<T> createFromVar(java.util.function.Function<java.lang.Integer,T> constructor, java.lang.String varName)
ObjectReader that creates objects with the given constructor. The argument passed to
the
constructor is taken from the given context variable, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvarName - the variable to use as parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFrom2Vars(Int2Constructor<T> constructor, java.lang.String var1, java.lang.String var2)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvar1 - the variable to use as 1st parameter to the given constructorvar2 - the variable to use as 2nd parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFrom3Vars(Int3Constructor<T> constructor, java.lang.String var1, java.lang.String var2, java.lang.String var3)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvar1 - the variable to use as 1st parameter to the given constructorvar2 - the variable to use as 2nd parameter to the given constructorvar3 - the variable to use as 3rd parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFrom4Vars(Int4Constructor<T> constructor, java.lang.String var1, java.lang.String var2, java.lang.String var3, java.lang.String var4)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvar1 - the variable to use as 1st parameter to the given constructorvar2 - the variable to use as 2nd parameter to the given constructorvar3 - the variable to use as 3rd parameter to the given constructorvar4 - the variable to use as 4th parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFrom5Vars(Int5Constructor<T> constructor, java.lang.String var1, java.lang.String var2, java.lang.String var3, java.lang.String var4, java.lang.String var5)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvar1 - the variable to use as 1st parameter to the given constructorvar2 - the variable to use as 2nd parameter to the given constructorvar3 - the variable to use as 3rd parameter to the given constructorvar4 - the variable to use as 4th parameter to the given constructorvar5 - the variable to use as 5th parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFrom6Vars(Int6Constructor<T> constructor, java.lang.String var1, java.lang.String var2, java.lang.String var3, java.lang.String var4, java.lang.String var5, java.lang.String var6)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvar1 - the variable to use as 1st parameter to the given constructorvar2 - the variable to use as 2nd parameter to the given constructorvar3 - the variable to use as 3rd parameter to the given constructorvar4 - the variable to use as 4th parameter to the given constructorvar5 - the variable to use as 5th parameter to the given constructorvar6 - the variable to use as 6th parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFrom7Vars(Int7Constructor<T> constructor, java.lang.String var1, java.lang.String var2, java.lang.String var3, java.lang.String var4, java.lang.String var5, java.lang.String var6, java.lang.String var7)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvar1 - the variable to use as 1st parameter to the given constructorvar2 - the variable to use as 2nd parameter to the given constructorvar3 - the variable to use as 3rd parameter to the given constructorvar4 - the variable to use as 4th parameter to the given constructorvar5 - the variable to use as 5th parameter to the given constructorvar6 - the variable to use as 6th parameter to the given constructorvar7 - the variable to use as 7th parameter to the given constructorObjectReaderpublic <T> ObjectReader<T> createFromVars(IntArrayConstructor<T> constructor, java.lang.String... vars)
ObjectReader that creates objects with the given constructor. The arguments passed
to the
constructor are taken from the given context variables, that must be set up front via HCReader.withVars(String...).T - the type of objects that the new ObjectReader should createconstructor - the constructor to use to create new instancesvars - the variables to use as parameters to the given constructorObjectReader