public class CSVData extends Object
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<String> |
elements
The values comprising the line
|
| Constructor and Description |
|---|
CSVData() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(String element)
Appends a value to the line
|
void |
clear()
Removes all values from the line
|
protected String |
enquote(String string)
Surrounds a string with double quotes if it contains either a double
quote or a comma; replaces double quotes with a pair of double quotes
|
void |
insert(int index,
String element)
Inserts a value into the line at a given index
|
void |
remove(int index)
Removes the value at the given index of the line
|
void |
set(int index,
String element)
Replaces the value at the index of the line with a new
value
|
String |
toString()
Returns the line of CSV data represented by this class
|
protected LinkedList<String> elements
public void append(String element)
element - The element to be appended.public void insert(int index,
String element)
index - The index at which the value is to be insertedelement - The value to be insertedpublic void remove(int index)
index - The index from which to remove a valuepublic void set(int index,
String element)
index - The index at which to replace a valueelement - The value with which to replacepublic void clear()
public String toString()