Class VarListBuilderWithApply<ORIGINAL,​TRANSFORMED>

  • Type Parameters:
    ORIGINAL - This is the original 'type' of the container's contents, before those contents are transformed. In the case of FileNode and FileNode.RetTypeChoice, this shall always be FileNode.
    TRANSFORMED - This is the 'type' for the container's contents, after a transformation - which, in the case of FileNode and FileNode.RetTypeChoice, is a cute way of saying FileNode.toString() and FileNode.getFullPathName()).

    In the above mentioned case, type <TRANSFORMED> (the 'transformation-type') will always be java.lang.String. These String's would all hold either a 'file-name' or a 'full-path file-name'.

    public class VarListBuilderWithApply<ORIGINAL,​TRANSFORMED>
    extends java.lang.Object
    Implementation of the FileNode class 'RetTypeChoice'.

    Java HTML Library Helper for Torello.Java.FileNode

    Currently, the only application for the VarList User-Specified Variable Return Type Interface may be found in the FileNode helper-class 'RetTypeChoice'.
    This class will build an suite of implementations of the VarList interface. This version provides the ability to transform the input list-class.


    • Field Detail

      • VECTOR

        🡇    
        public final VarList<java.util.Vector<TRANSFORMED>,​ORIGINAL> VECTOR
        This VarList instance has a 'retrieve()' method that will return a Vector whose Vector-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<Vector<TRANSFORMED>, ORIGINAL> VECTOR;
        
      • ARRAYLIST

        🡅  🡇    
        public final VarList<java.util.ArrayList<TRANSFORMED>,​ORIGINAL> ARRAYLIST
        This VarList instance has a 'retrieve()' method that will return an ArrayList whose ArrayList-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<ArrayList<TRANSFORMED>, ORIGINAL> ARRAYLIST;
        
      • ITERATOR

        🡅  🡇    
        public final VarList<java.util.Iterator<TRANSFORMED>,​ORIGINAL> ITERATOR
        This VarList instance has a 'retrieve()' method that will return an Iterator whose Iterator-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<Iterator<TRANSFORMED>, ORIGINAL> ITERATOR;
        
      • ARRAY

        🡅  🡇    
        public final VarList<TRANSFORMED[],​ORIGINAL> ARRAY
        This VarList instance has a 'retrieve()' method that will return an array whose array-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<TRANSFORMED[], ORIGINAL> ARRAY;
        
      • STREAM

        🡅  🡇    
        public final VarList<java.util.stream.Stream<TRANSFORMED>,​ORIGINAL> STREAM
        This VarList instance has a 'retrieve()' method that will return a Stream whose Stream-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<Stream<TRANSFORMED>, ORIGINAL> STREAM;
        
      • STREAM_BUILDER

        🡅  🡇    
        public final VarList<java.util.stream.Stream.Builder<TRANSFORMED>,​ORIGINAL> STREAM_BUILDER
        This VarList instance has a 'retrieve()' method that will return a Stream.Builder whose Builder-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<Stream.Builder<TRANSFORMED>, ORIGINAL> STREAM_BUILDER;
        
      • LINKEDLIST

        🡅  🡇    
        public final VarList<java.util.LinkedList<TRANSFORMED>,​ORIGINAL> LINKEDLIST
        This VarList instance has a 'retrieve()' method that will return a LinkedList whose LinkedList-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<LinkedList<TRANSFORMED>, ORIGINAL> LINKEDLIST;
        
      • HASHSET

        🡅  🡇    
        public final VarList<java.util.HashSet<TRANSFORMED>,​ORIGINAL> HASHSET
        This VarList instance has a 'retrieve()' method that will return a HashSet whose HashSet-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<HashSet<TRANSFORMED>, ORIGINAL> HASHSET;
        
      • STACK

        🡅  🡇    
        public final VarList<java.util.Stack<TRANSFORMED>,​ORIGINAL> STACK
        This VarList instance has a 'retrieve()' method that will return a Stack whose Stack-contents are of parametrized-type 'TRANSFORMED'
        Code:
        Exact Field Declaration Expression:
        public final VarList<Stack<TRANSFORMED>, ORIGINAL> STACK;
        
    • Constructor Detail

      • VarListBuilderWithApply

        🡅    
        public VarListBuilderWithApply​
                    (java.util.function.Function<ORIGINAL,​TRANSFORMED> transformer,
                     java.lang.Class<TRANSFORMED> outputClass)
        
        Builds all 8 of the VarList's provided by this builder class.
        Parameters:
        transformer - This transformer is used to convert the contents of the returned list-type. As noticed by its type, 'Function<ORIGINAL, TRANSFORMED>', the final type of the returned VarList will of type 'TRANSFORMED', although while building this 'VarList', the elements that shall be inserted will be of type 'ORIGINAL'.

        It is the job of the transformer parameter to convert the elements from type 'CONTENTS' to type 'TRANSFORMED'
        outputClass - The final list that is built will be of type class U. Because java generics use "Type Erasure," this class must be obtained here. It is used for array generation or array-construction.