|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ricebridge.csvman.LineProviderSupportImpl
com.ricebridge.csvman.CustomLineProvider
com.ricebridge.csvman.AsListsLineProvider
Simple implementation of LineProvider that provides data lines for saving
from a List of Lists of Strings.
The easiest way to save your CSV data in this format is to use the
CsvManager.saveAsLists method.
AsListsLineProvider is designed to be subclassed. You can change
the default implementation by calling the
CsvManagerStore.setAsListsLineProviderClass
method, and providing a subclass of AsListsLineProvider. CsvManagerStore can be accessed
using CsvManager.getCsvManagerStore().
The Source Code of this Java class is available under a BSD-style license.
LineProvider,
CustomLineProvider,
BasicLineProvider,
ResultSetLineProvider,
TableModelLineProvider,
BeanLineProvider| Field Summary | |
protected List |
iData
List of Lists of Strings. |
protected long |
iLineIndex
Index of current line in List. |
| Constructor Summary | |
AsListsLineProvider()
Create uninitialised for use with setData. |
|
AsListsLineProvider(List pData)
Create with data lines as List of Lists of Strings. |
|
| Method Summary | |
boolean |
hasNextLineImpl()
Return true if line index is less than number of data lines in list. |
protected String |
makeLineDescription(Object pLine)
Description of data line for error messages. |
String[] |
nextLineImpl()
Return next data line from list. |
void |
setData(List pData)
Set data lines to save as List of Lists of Strings. |
void |
startProcessImpl()
Handle start of saving process by reseting line index. |
| Methods inherited from class com.ricebridge.csvman.CustomLineProvider |
endProcessImpl, setCsvSpecImpl, setLineSpecImpl |
| Methods inherited from class com.ricebridge.csvman.LineProviderSupportImpl |
endProcess, hasNextLine, nextLine, setCsvSpec, setLineSpec, startProcess |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected List iData
List of Lists of Strings.
protected long iLineIndex
List.
| Constructor Detail |
public AsListsLineProvider()
setData.
public AsListsLineProvider(List pData)
List of Lists of Strings.
pData - list of lines| Method Detail |
public void startProcessImpl()
throws Exception
startProcessImpl in class CustomLineProviderExceptionendProcessImpl
public boolean hasNextLineImpl()
throws Exception
true if line index is less than number of data lines in list.
hasNextLineImpl in class CustomLineProviderExceptionLineProvider.hasNextLine,
nextLineImpl
public String[] nextLineImpl()
throws Exception
nextLineImpl in class CustomLineProviderExceptionLineProvider.nextLine,
hasNextLineImplpublic void setData(List pData)
List of Lists of Strings.
protected String makeLineDescription(Object pLine)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||