Package Torello.Java
Class VarType<RET_DATA_STRUCTURE,INSERT_TYPE>
- java.lang.Object
-
- Torello.Java.VarType<RET_DATA_STRUCTURE,INSERT_TYPE>
-
- Type Parameters:
INSERT_TYPE
- Currently, the only class usingVarType
is classFileNode
. Within classFileNode
, this Type-Parameter,'INSERT_TYPE'
, is always assigned the value of class'FileNode'
RET_DATA_STRUCTURE
- This Generic Type-Parameter provides a user the ability to specify any Method Return-Type needed / desired. In classFileNode
, for instance, this Type-Parameter is often assigned to things such as:Stream<FileNode>
,Iterator<FileNode>
or evenString[]
- where each of theString's
are actual File-Names as aString
.
If this classVarType
where used elsewhere, outside ofFileNode
, then the Generic Type-Parameter'RET_DATA_STRUCTURE'
would allow a user to provide a means for his / her users to specify, exactly, any method's Return Type/Class.
- Direct Known Subclasses:
RTC
public class VarType<RET_DATA_STRUCTURE,INSERT_TYPE> extends java.lang.Object
Provides any method the ability to provide its users the ability to choose what kind of data structure should be used for returning the method's results. Currently, this class is used as a helper class for classFileNode
- See Also:
FileNode
Hi-Lited Source-Code:- View Here: Torello/Java/VarType.java
- Open New Browser-Tab: Torello/Java/VarType.java
File Size: 1,983 Bytes Line Count: 42 '\n' Characters Found
-
-
Field Summary
Fields Modifier and Type Field Supplier<RET_DATA_STRUCTURE>
finisher
Consumer<INSERT_TYPE>
inserter
-
Constructor Summary
Constructors Constructor Description VarType(Consumer<INSERT_TYPE> inserter, Supplier<RET_DATA_STRUCTURE> finisher)
Constructs an instance of this class
-
-
-
Field Detail
-
inserter
public final java.util.function.Consumer<INSERT_TYPE> inserter
Accepts and inserts data into the data-structure.
-
finisher
public final java.util.function.Supplier<RET_DATA_STRUCTURE> finisher
Performs any finalizations on the data-structure, and then returns it
-
-
Constructor Detail
-
VarType
public VarType(java.util.function.Consumer<INSERT_TYPE> inserter, java.util.function.Supplier<RET_DATA_STRUCTURE> finisher)
-
-