|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iglu.util.FileLookup
FileLookup creates a lookup table (map) from a delimited file. Each entry in the file has two strings (a key and a value) separated by a pipe (|) character. Pipe characters can optionally be at the beginning and the end of each line.
Field Summary | |
private java.util.HashMap |
table
|
Constructor Summary | |
FileLookup(java.io.File file)
Constructs a file lookup item from the given file. |
|
FileLookup(java.lang.String filename)
Constructs a file lookup item from the given file. |
Method Summary | |
java.lang.String |
lookup(java.lang.String key)
Returns the value of the given key. |
static void |
main(java.lang.String[] args)
Tests the lookup on a file given from the command line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.HashMap table
Constructor Detail |
public FileLookup(java.lang.String filename)
public FileLookup(java.io.File file)
Method Detail |
public java.lang.String lookup(java.lang.String key)
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |