|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.io.AbstractMapInputFile<K,V>
sbrt.shell.io.RomiFile<K,V>
K
- the key type.V
- the value type.public class RomiFile<K,V>
This class is used to read row-oriented map input files. These files contain only a single map.
Constructor Summary | |
---|---|
RomiFile(java.lang.String fileName,
FileFormat fileFormat,
MapFormat<K,V> mapFormat)
Constructs a new row-oriented map input file from the provided arguments. |
|
RomiFile(java.lang.String fileName,
FileFormat fileFormat,
java.util.Set<? extends K> requiredKeys,
MapFormat<K,V> mapFormat)
Constructs a new row-oriented map input file from the provided arguments. |
|
RomiFile(java.lang.String fileName,
MapFormat<K,V> mapFormat)
Constructs a new row-oriented map input file from the provided arguments. |
|
RomiFile(java.lang.String fileName,
java.util.Set<? extends K> requiredKeys,
MapFormat<K,V> mapFormat)
Constructs a new row-oriented map input file from the provided arguments. |
Method Summary | |
---|---|
UnmodifiableSet<K> |
getKeys()
Returns the keys of the map contained in this file. |
UnmodifiableMap<K,V> |
getMap()
Returns the map contained in this file. |
java.util.Iterator<java.util.Map<K,V>> |
iterator()
Returns an iterator over this file. |
Methods inherited from class sbrt.shell.io.AbstractMapInputFile |
---|
close, getCanonicalName, getMapFormat, getOriginalName, getRequiredKeys, isClosed, lineIterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RomiFile(java.lang.String fileName, FileFormat fileFormat, java.util.Set<? extends K> requiredKeys, MapFormat<K,V> mapFormat)
fileName
- the name of the file to read.fileFormat
- the format of the file.requiredKeys
- the keys that are required to be in the file.mapFormat
- the format used to parse the file.public RomiFile(java.lang.String fileName, FileFormat fileFormat, MapFormat<K,V> mapFormat)
fileName
- the name of the file to read.fileFormat
- the format of the file.mapFormat
- the format used to parse the file.public RomiFile(java.lang.String fileName, MapFormat<K,V> mapFormat)
fileName
- the name of the file to read.mapFormat
- the format used to parse the file.public RomiFile(java.lang.String fileName, java.util.Set<? extends K> requiredKeys, MapFormat<K,V> mapFormat)
fileName
- the name of the file to read.requiredKeys
- the keys that are required to be in the file.mapFormat
- the format used to parse the file.Method Detail |
---|
public UnmodifiableMap<K,V> getMap()
FormatException
- if the file does not contain a required variable,
contains a single variable multiple times, or contains any other formatting errors.public UnmodifiableSet<K> getKeys()
FormatException
- if the file does not contain a required variable,
contains a single variable multiple times, or contains any other formatting errors.public java.util.Iterator<java.util.Map<K,V>> iterator()
getMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |