|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.talvi.puffinplot.data.CustomFields<T>
T - the type of data to be stored in the fieldspublic class CustomFields<T>
Represents a set of custom fields for sample annotation. The field list is indexed by a non-negative integer, and contains values (objects) of a specified type.
| Constructor Summary | |
|---|---|
CustomFields()
Creates an empty set of custom fields. |
|
CustomFields(java.util.List<T> initialValues)
Creates a set of custom fields with the specified values. |
|
| Method Summary | |
|---|---|
void |
add(int position,
T value)
Adds a new value to this custom field list. |
java.lang.String |
exportAsString()
Returns a string representation of the list of values. |
T |
get(int number)
Gets the value of a specified custom field. |
void |
remove(int position)
Removes a value from this custom field list. |
void |
set(int number,
T value)
Sets a specified custom field to a specified value. |
void |
setSize(int newSize,
T fillWith)
Sets the size of the list of custom fields. |
int |
size()
Returns the number of values in this list. |
void |
swapAdjacent(int position)
Swaps the values in two adjacent positions within this custom field list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomFields(java.util.List<T> initialValues)
initialValues - the values with which to initialize the fieldspublic CustomFields()
| Method Detail |
|---|
public void set(int number,
T value)
number - the index of the field to setvalue - the value to which to set the fieldpublic T get(int number)
null is returned
number - the index of a field
null if there is no such field
public void setSize(int newSize,
T fillWith)
newSize - the new size of the custom field listfillWith - the value with which to fill the list
public void add(int position,
T value)
position - the position at which to insert the new valuevalue - the value to insertpublic void remove(int position)
position - the index of the value to removepublic void swapAdjacent(int position)
position - the first of the positions to swap; its value will
be swapped with the next valuepublic java.lang.String exportAsString()
public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||