Class VarListBuilderWithSort<T>


  • public class VarListBuilderWithSort<T>
    extends java.lang.Object
    VarListBuilderWithSort<T> - Documentation.

    This class will build an suite of implementations of the VarList interface. This version provides the ability to sort the input list-class.



    • Field Detail

      • VECTOR

        public final VarList<java.util.Vector<T>,​T> VECTOR
        This VarList instance has a 'retrieve()' method that will return an Vector whose Vector-contents are of parametrized-type 'T'. The Vector returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<Vector<T>, T>          VECTOR;
        
      • ARRAYLIST

        public final VarList<java.util.ArrayList<T>,​T> ARRAYLIST
        This VarList instance has a 'retrieve()' method that will return an ArrayList whose ArrayList-contents are of parametrized-type 'T'. The ArrayList returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<ArrayList<T>, T>       ARRAYLIST;
        
      • ITERATOR

        public final VarList<java.util.Iterator<T>,​T> ITERATOR
        This VarList instance has a 'retrieve()' method that will return an Iterator whose Iterator-contents are of parametrized-type 'T'. The Iterator returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<Iterator<T>, T>        ITERATOR;
        
      • ARRAY

        public final VarList<T[],​T> ARRAY
        This VarList instance has a 'retrieve()' method that will return an array whose array-contents are of parametrized-type 'T'. The array returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<T[], T>                ARRAY;
        
      • STREAM

        public final VarList<java.util.stream.Stream<T>,​T> STREAM
        This VarList instance has a 'retrieve()' method that will return a Stream whose Stream-contents are of parametrized-type 'T'. The Stream returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<Stream<T>, T>          STREAM;
        
      • STREAM_BUILDER

        public final VarList<java.util.stream.Stream.Builder<T>,​T> STREAM_BUILDER
        Instances of Stream.Builder cannot be sorted. Only a built Stream may be sorted. Therefore this parameter shall always be null.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<Stream.Builder<T>, T>  STREAM_BUILDER = null;
        
      • LINKEDLIST

        public final VarList<java.util.LinkedList<T>,​T> LINKEDLIST
        This VarList instance has a 'retrieve()' method that will return a LinkedList whose LinkedList-contents are of parametrized-type 'T'. The LinkedList returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<LinkedList<T>, T>      LINKEDLIST;
        
      • TREESET

        public final VarList<java.util.TreeSet<T>,​T> TREESET
        This VarList instance has a 'retrieve()' method that will return a TreeSet whose TreeSet-contents are of parametrized-type 'T'. The TreeSet returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<TreeSet<T>, T>         TREESET;
        
      • STACK

        public final VarList<java.util.Stack<T>,​T> STACK
        This VarList instance has a 'retrieve()' method that will return a Stack whose Stack-contents are of parametrized-type 'T'. The Stack returned will have already been sorted upon return.
        Code:
        Exact Field Declaration Expression:
        1
        public final VarList<Stack<T>, T>           STACK;
        
    • Constructor Detail

      • VarListBuilderWithSort

        public VarListBuilderWithSort​(java.util.Comparator<T> comparator,
                                      java.lang.Class<T> listClass)
        Builds all 8 of the VarList's provided by this builder class.
        Parameters:
        comparator - This is used to sort the returned list.
        listClass - This is the class of the final list that is produced. Due to Java's type-erasure for generics, this 'class' must be obtained here.