|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.UserStrings
public class UserStrings
Manages the user-defined strings (essentially macros w/out parameters, currently) System strings have the format of starting with: $ followed by an alphanumeric and then alphanumerics or the _ character They are defined with [def:$macro{meaning}]. They are printed by the command operator *, as in: [*$macro]
Field Summary | |
---|---|
private java.util.TreeMap |
userStrings
|
Constructor Summary | |
---|---|
UserStrings()
|
Method Summary | |
---|---|
int |
add(java.lang.String key,
java.lang.String value)
Add a string to user strings after validating they don't start with $_. |
java.lang.String |
dump(Literals lits)
Returns a string containing all the keys and values formatted one-to-a-line for printing to console or document. |
int |
getSize()
How many system Strings are defined |
java.lang.String |
getString(java.lang.String key)
Returns the string associated to a given key |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.util.TreeMap userStrings
Constructor Detail |
---|
public UserStrings()
Method Detail |
---|
public int add(java.lang.String key, java.lang.String value)
key
- string that should not start with $_value
- where any legal string is OK except null
public java.lang.String dump(Literals lits)
lits
- literals to use in the dump output
public int getSize()
public java.lang.String getString(java.lang.String key)
key
- the key to use for the lookup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |