Class DefaultCsvNamedTable
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.jmrit.logixng.implementation.AbstractNamedTable
-
- jmri.jmrit.logixng.implementation.DefaultCsvNamedTable
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,NamedTable
,Table
,NamedBean
public class DefaultCsvNamedTable extends AbstractNamedTable
The default implementation of a NamedTable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Table
Table.ColumnNotFoundException, Table.CsvType, Table.RowNotFoundException
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.logixng.implementation.AbstractNamedTable
_internalTable
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DefaultCsvNamedTable(java.lang.String sys, java.lang.String user, java.lang.String fileName, java.lang.Object[][] data, Table.CsvType csvType)
Create a new named table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Table.CsvType
getCsvType()
java.lang.String
getFileName()
boolean
isCsvTypeSupported()
void
setCsvType(Table.CsvType csvType)
void
setFileName(java.lang.String fileName)
-
Methods inherited from class jmri.jmrit.logixng.implementation.AbstractNamedTable
getBeanType, getCell, getColumnNumber, getRowNumber, getState, loadTableFromCSV_File, loadTableFromCSV_File, loadTableFromCSV_Text, numColumns, numRows, setCell, setState, storeTableAsCSV, storeTableAsCSV
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
DefaultCsvNamedTable
public DefaultCsvNamedTable(@Nonnull java.lang.String sys, @CheckForNull java.lang.String user, @CheckForNull java.lang.String fileName, @Nonnull java.lang.Object[][] data, Table.CsvType csvType) throws NamedBean.BadUserNameException, NamedBean.BadSystemNameException
Create a new named table.- Parameters:
sys
- the system nameuser
- the user name or null if no user namefileName
- the file name of the CSV tabledata
- the data in the table. Note that this data is not copied to a new array but used by the table as is.csvType
- the type of delimiter used for the file (comma or tab)- Throws:
NamedBean.BadUserNameException
NamedBean.BadSystemNameException
-
-
Method Detail
-
isCsvTypeSupported
public boolean isCsvTypeSupported()
-
getFileName
public java.lang.String getFileName()
-
setFileName
public void setFileName(java.lang.String fileName)
-
setCsvType
public void setCsvType(Table.CsvType csvType)
-
getCsvType
public Table.CsvType getCsvType()
-
-