|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sen.util.CSVData
public class CSVData
A class used to build a line of CSV data
| Field Summary | |
|---|---|
protected LinkedList<String> |
elements
The values comprising the line |
| Constructor Summary | |
|---|---|
CSVData()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected LinkedList<String> elements
| Constructor Detail |
|---|
public CSVData()
| Method Detail |
|---|
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 value
public 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()
toString in class Objectprotected String enquote(String string)
string - The string to quote
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||