|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.firstpartners.nounit.ui.common.AbstractPackage
An abstract package that encapsulates a hashtable to provide conversion of command-line arguments
Field Summary | |
protected java.util.HashMap |
innerValuePairs
|
Constructor Summary | |
protected |
AbstractPackage()
default constructor |
protected |
AbstractPackage(java.lang.Object[] inValues)
Constructor builds Package using Standard Values (as from command Line) Overwrites any Previous Values |
Method Summary | |
void |
addAdditionalValue(java.lang.String key,
java.lang.Object value)
Add the value pairs to the internal store - do not overwrite , but convert to vector |
void |
addIfEmpty(java.lang.String keyName,
java.lang.Object storeObject)
adds a value to the internal store , only if previous value was null / empty |
protected void |
addValue(java.lang.Object[] inValues)
Add set of KeyName - ValueName (in one array) to object , used by Constructor , and classes inheriting from this one Overwrites any existing values with same name |
void |
addValue(java.lang.Object keyName,
java.lang.Object storeObject)
adds a value to the internal store Overwrites any existing values with same name |
void |
addValues(java.util.HashMap valuesToAdd)
Set the Values in the web package , given a hashtable Overwrites any existing values with same name |
void |
addValues(java.lang.String[] inValues)
Add the value pairs to the internal store Overwrites any existing values with same name |
int |
getInt(java.lang.String keyName)
Get the Value as an int (Convience Method) |
java.util.Iterator |
getStoreNames()
Gets the names of values stored in this webpackage |
java.lang.String |
getString(java.lang.String keyName)
Get the Value as a String (Convience Method) |
java.lang.Object |
getValue(java.lang.String keyName)
gets the value associated with the key name , as passed in from the Servlet, command line |
java.util.HashMap |
getValuePairs()
Method to return a hashtable of value pairs |
java.util.Vector |
getVector(java.lang.String keyName)
Get the Value as a Vector (Convience Method) |
void |
move(java.lang.String oldKey,
java.lang.String newKey)
Moves Objects from one key to another will overwrite anything (previously)held at the new key |
void |
printToOutputStream(java.io.PrintStream out)
Prints the internal represenation of the Package to an output stream for debugging |
void |
remove(java.lang.Object key)
Remove a value from the internal store |
java.lang.String |
toString()
Prints the internal represenation of the Package to an output stream for debugging |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.HashMap innerValuePairs
Constructor Detail |
protected AbstractPackage()
protected AbstractPackage(java.lang.Object[] inValues)
inValues
- pairs as generated by the command lineMethod Detail |
protected void addValue(java.lang.Object[] inValues)
inValues
- - Array of keys and values to addpublic java.lang.Object getValue(java.lang.String keyName)
keyName
- - the name the value is stored under.public void addValue(java.lang.Object keyName, java.lang.Object storeObject)
keyName
- to store the object under for later retrievalstoreObject
- to keep internallypublic java.util.Iterator getStoreNames()
public java.util.HashMap getValuePairs()
public void addValues(java.util.HashMap valuesToAdd)
valuesToAdd
- public java.lang.String getString(java.lang.String keyName)
keyName
- of Value to findpublic java.util.Vector getVector(java.lang.String keyName)
keyName
- of Value to findpublic int getInt(java.lang.String keyName)
keyName
- of Value to findpublic void printToOutputStream(java.io.PrintStream out)
out
- - java.io.PrintStream to print topublic java.lang.String toString()
toString
in class java.lang.Object
public void addAdditionalValue(java.lang.String key, java.lang.Object value)
key
- objectvalue
- objectpublic void addValues(java.lang.String[] inValues)
inValues
- - Array to add to Value pairs e.g. key1 , value1, key2 , value2public void remove(java.lang.Object key)
key
- of object to removepublic void move(java.lang.String oldKey, java.lang.String newKey)
oldKey
- - StringnewKey
- - Stringpublic void addIfEmpty(java.lang.String keyName, java.lang.Object storeObject)
keyName
- to store the object under for later retrievalstoreObject
- to keep internally
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |