Package Torello.Java.Additional
Class VarListBuilderWithSort<CONTENTS>
- java.lang.Object
-
- Torello.Java.Additional.VarListBuilderWithSort<CONTENTS>
-
- Type Parameters:
CONTENTS
- This is the 'type' of the original data-structure. For instance, in the case of classFileNode
andFileNode.RetTypeChoice
, this shall always be typeFileNode
.
public class VarListBuilderWithSort<CONTENTS> extends java.lang.Object
Implementation of theFileNode
class'RetTypeChoice'
.
Java HTML Library Helper for Torello.Java.FileNode
Currently, the only application for theVarList
User-Specified Variable Return Type Interface is for theFileNode
helper-class'RetTypeChoice'
.
This class could theoretically be used wherever there are many container-variants for the same set of identical-data being returned to a user.
This class will build an suite of implementations of theVarList
interface. This version provides the ability to sort the list-contents class / type.
Hi-Lited Source-Code:- View Here: Torello/Java/Additional/VarListBuilderWithSort.java
- Open New Browser-Tab: Torello/Java/Additional/VarListBuilderWithSort.java
-
-
Field Summary
Fields Modifier and Type Field VarList<CONTENTS[],CONTENTS>
ARRAY
VarList<ArrayList<CONTENTS>,
CONTENTS>ARRAYLIST
VarList<Iterator<CONTENTS>,
CONTENTS>ITERATOR
VarList<LinkedList<CONTENTS>,
CONTENTS>LINKEDLIST
VarList<Stack<CONTENTS>,CONTENTS>
STACK
VarList<Stream<CONTENTS>,CONTENTS>
STREAM
VarList<Stream.Builder<CONTENTS>,
CONTENTS>STREAM_BUILDER
VarList<TreeSet<CONTENTS>,
CONTENTS>TREESET
VarList<Vector<CONTENTS>,CONTENTS>
VECTOR
-
Constructor Summary
Constructors Constructor VarListBuilderWithSort(Comparator<CONTENTS> comparator, Class<CONTENTS> listClass)
-
-
-
Field Detail
-
VECTOR
public final VarList<java.util.Vector<CONTENTS>,CONTENTS> VECTOR
ThisVarList
instance has a'retrieve()'
method that will return aVector
whoseVector
-contents are of parametrized-type'CONTENTS'
. TheVector
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<Vector<CONTENTS>, CONTENTS> VECTOR;
-
ARRAYLIST
public final VarList<java.util.ArrayList<CONTENTS>,CONTENTS> ARRAYLIST
ThisVarList
instance has a'retrieve()'
method that will return anArrayList
whoseArrayList
-contents are of parametrized-type'CONTENTS'
. TheArrayList
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<ArrayList<CONTENTS>, CONTENTS> ARRAYLIST;
-
ITERATOR
public final VarList<java.util.Iterator<CONTENTS>,CONTENTS> ITERATOR
ThisVarList
instance has a'retrieve()'
method that will return anIterator
whoseIterator
-contents are of parametrized-type'CONTENTS'
. TheIterator
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<Iterator<CONTENTS>, CONTENTS> ITERATOR;
-
ARRAY
public final VarList<CONTENTS[],CONTENTS> ARRAY
ThisVarList
instance has a'retrieve()'
method that will return anarray
whosearray
-contents are of parametrized-type'CONTENTS'
. Thearray
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<CONTENTS[], CONTENTS> ARRAY;
-
STREAM
public final VarList<java.util.stream.Stream<CONTENTS>,CONTENTS> STREAM
ThisVarList
instance has a'retrieve()'
method that will return aStream
whoseStream
-contents are of parametrized-type'CONTENTS'
. TheStream
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<Stream<CONTENTS>, CONTENTS> STREAM;
-
STREAM_BUILDER
public final VarList<java.util.stream.Stream.Builder<CONTENTS>,CONTENTS> STREAM_BUILDER
Instances ofStream.Builder
cannot be sorted. Only a builtStream
may be sorted. Therefore this parameter shall always be null.- Code:
- Exact Field Declaration Expression:
public final VarList<Stream.Builder<CONTENTS>, CONTENTS> STREAM_BUILDER = null;
-
LINKEDLIST
public final VarList<java.util.LinkedList<CONTENTS>,CONTENTS> LINKEDLIST
ThisVarList
instance has a'retrieve()'
method that will return aLinkedList
whoseLinkedList
-contents are of parametrized-type'CONTENTS'
. TheLinkedList
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<LinkedList<CONTENTS>, CONTENTS> LINKEDLIST;
-
TREESET
public final VarList<java.util.TreeSet<CONTENTS>,CONTENTS> TREESET
ThisVarList
instance has a'retrieve()'
method that will return aTreeSet
whoseTreeSet
-contents are of parametrized-type'CONTENTS'
. TheTreeSet
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<TreeSet<CONTENTS>, CONTENTS> TREESET;
-
STACK
public final VarList<java.util.Stack<CONTENTS>,CONTENTS> STACK
ThisVarList
instance has a'retrieve()'
method that will return aStack
whoseStack
-contents are of parametrized-type'CONTENTS'
. TheStack
returned will have already been sorted upon return.- Code:
- Exact Field Declaration Expression:
public final VarList<Stack<CONTENTS>, CONTENTS> STACK;
-
-
Constructor Detail
-
VarListBuilderWithSort
public VarListBuilderWithSort(java.util.Comparator<CONTENTS> comparator, java.lang.Class<CONTENTS> listClass)
Builds all 8 of theVarList'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.
-
-