|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.io.AbstractMapInputFile<K,V>
K
- the key type.V
- the value type.public abstract class AbstractMapInputFile<K,V>
This abstract class is a skeleton implemenation of text-based map input files.
Constructor Summary | |
---|---|
AbstractMapInputFile(java.lang.String fileName,
FileFormat fileFormat,
MapFormat<K,V> mapFormat)
Constructs a new map input file from the provided arguments. |
|
AbstractMapInputFile(java.lang.String fileName,
FileFormat fileFormat,
java.util.Set<? extends K> requiredKeys,
MapFormat<K,V> mapFormat)
Constructs a new map input file from the provided arguments. |
Method Summary | |
---|---|
void |
close()
Closes this file. |
java.lang.String |
getCanonicalName()
Returns the canonical name of this file. |
MapFormat<K,V> |
getMapFormat()
Returns the map format used to parse this file. |
java.lang.String |
getOriginalName()
Returns the name of this file. |
UnmodifiableSet<K> |
getRequiredKeys()
Returns the set of keys that must be contained in this file. |
boolean |
isClosed()
Indicates if this file has already been closed. |
protected TextFileLineIterator<java.lang.String> |
lineIterator()
Returns a plain text line iterator over this text file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Constructor Detail |
---|
public AbstractMapInputFile(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 set of keys this file must contain.mapFormat
- the map format used to parse this file.public AbstractMapInputFile(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 map format used to parse this file.Method Detail |
---|
public UnmodifiableSet<K> getRequiredKeys()
public MapFormat<K,V> getMapFormat()
getMapFormat
in interface MapTextFile<K,V>
protected final TextFileLineIterator<java.lang.String> lineIterator()
public void close()
close
in interface SbrtFile
public final java.lang.String getOriginalName()
getOriginalName
in interface SbrtFile
public final java.lang.String getCanonicalName()
getCanonicalName
in interface SbrtFile
File.getCanonicalPath()
public boolean isClosed()
isClosed
in interface SbrtFile
true
if this file is closed;
false
othewise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |