Package org.simpleframework.xml.core
Class SignatureBuilder.ParameterTable
java.lang.Object
java.util.AbstractCollection<SignatureBuilder.ParameterList>
java.util.AbstractList<SignatureBuilder.ParameterList>
java.util.ArrayList<SignatureBuilder.ParameterList>
org.simpleframework.xml.core.SignatureBuilder.ParameterTable
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<SignatureBuilder.ParameterList>
,Collection<SignatureBuilder.ParameterList>
,List<SignatureBuilder.ParameterList>
,RandomAccess
,SequencedCollection<SignatureBuilder.ParameterList>
- Enclosing class:
SignatureBuilder
private static class SignatureBuilder.ParameterTable
extends ArrayList<SignatureBuilder.ParameterList>
The
ParameterTable
is used to build a table of
parameters to represent a constructor. Each column of parameters
mirrors the index of the parameter in the constructor with each
parameter containing its type and the annotation it uses.-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(int column) This is used to acquire the column of parameters from the table.get
(int column, int row) This is used to get aParameter
at the row and column specified.private int
height()
This represents the number of parameters for each index in the table.void
This will add a a parameter at the specified column in the table.private int
width()
This is used to determine the width of this table.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
ParameterTable
public ParameterTable()Constructor for theParameterTable
object. This creates a table of parameters that can be used to represent each permutation of parameter and annotation pairs.
-
-
Method Details
-
height
private int height()This represents the number of parameters for each index in the table. This is determined from the first column within the table, if the table is empty this returns zero.- Returns:
- the height of the table using the first column
-
width
private int width()This is used to determine the width of this table. The width is the number of columns the table contains. Each column in represents a parameter at its index in the constructor.- Returns:
- this returns the width of the table
-
insert
This will add a a parameter at the specified column in the table. The parameter is typically added to the table at an index mirroring the index it appears within the constructor.- Parameters:
value
- this is the parameter to be added in the tablecolumn
- this is the index to added the parameter to
-
get
This is used to acquire the column of parameters from the table. If no column exists at the specified index then one is created and added to the table at the column index.- Specified by:
get
in interfaceList<SignatureBuilder.ParameterList>
- Overrides:
get
in classArrayList<SignatureBuilder.ParameterList>
- Parameters:
column
- this is the column to acquire from the table- Returns:
- the column of parameters from the table
-
get
This is used to get aParameter
at the row and column specified. This if the parameter does not exist the an index out of bounds exception is thrown.- Parameters:
column
- the column to acquire the parameter forrow
- the row to acquire the parameter for- Returns:
- this returns the parameter at the specified cell
-