Package org.simpleframework.xml.core
Class SignatureBuilder.ParameterTable
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<SignatureBuilder.ParameterList>
-
- org.simpleframework.xml.core.SignatureBuilder.ParameterTable
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<SignatureBuilder.ParameterList>,java.util.Collection<SignatureBuilder.ParameterList>,java.util.List<SignatureBuilder.ParameterList>,java.util.RandomAccess
- Enclosing class:
- SignatureBuilder
private static class SignatureBuilder.ParameterTable extends java.util.ArrayList<SignatureBuilder.ParameterList>
TheParameterTableis 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.
-
-
Constructor Summary
Constructors Constructor Description ParameterTable()Constructor for theParameterTableobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SignatureBuilder.ParameterListget(int column)This is used to acquire the column of parameters from the table.Parameterget(int column, int row)This is used to get aParameterat the row and column specified.private intheight()This represents the number of parameters for each index in the table.voidinsert(Parameter value, int column)This will add a a parameter at the specified column in the table.private intwidth()This is used to determine the width of this table.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
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
public void insert(Parameter value, int column)
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
public SignatureBuilder.ParameterList get(int column)
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:
getin interfacejava.util.List<SignatureBuilder.ParameterList>- Overrides:
getin classjava.util.ArrayList<SignatureBuilder.ParameterList>- Parameters:
column- this is the column to acquire from the table- Returns:
- the column of parameters from the table
-
get
public Parameter get(int column, int row)
This is used to get aParameterat 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
-
-