|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inxar.syntacs.util.StandardSession
Standard implementation of Session
.
Constructor Summary | |
StandardSession()
Constructs the Session which writes to System.out . |
|
StandardSession(Writer out)
Constructs the Session which writes to the given
Writer . |
Method Summary | |
void |
close()
To be called at the end of the session. |
boolean |
contains(String key)
Returns true if an entry exists for the given key, false otherwise. |
Object |
get(String key)
Returns the Object under the given key or
null if no such key exists. |
boolean |
getBoolean(String key)
Returns the boolean under the given key. |
boolean |
getBoolean(String key,
boolean def)
Returns the boolean under the given key. |
int |
getInt(String key)
Returns the Object under the given key. |
int |
getInt(String key,
int def)
Returns the Object under the given key. |
String |
getString(String key)
Returns the String under the given key or
null if no such key exists. |
String |
getString(String key,
String def)
Returns the String under the given key or
the given default if no such key exists. |
boolean |
isFalse(String key)
Returns true if an extry exists for the given key
and the value is either a boolean having value
false , the string "false", or the string "no". |
boolean |
isNotFalse(String key)
Returns true if no entry exists for the given key,
the value is either a boolean having value
true , or any string other than "false" or "no". |
boolean |
isNotTrue(String key)
Returns true if no entry exists for the given key,
the value is either a boolean having value
false , or any string other than "true" or "yes". |
boolean |
isTrue(String key)
Returns true if an extry exists for the given key
and the value is either a boolean having value
true , the string "true", or the string "yes". |
Log |
log(String name,
Object obj)
Registers the object with the control such that it may emit messages through the log channels. |
void |
put(String key,
Object val)
Stores the given value under the given key. |
Object |
remove(String key)
Removes the key/value pair and returns the value or null if no such key exists. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StandardSession()
Session
which writes to System.out
.public StandardSession(Writer out)
Session
which writes to the given
Writer
. If the given Writer
is not
an instanceof
BufferedWriter
it will
be wrapped with one.Method Detail |
public Log log(String name, Object obj)
Session
log
in interface Session
public void close()
Session
close
in interface Session
public void put(String key, Object val)
Session
put
in interface Session
public Object remove(String key)
Session
remove
in interface Session
public Object get(String key)
Session
Object
under the given key or
null
if no such key exists.get
in interface Session
public String getString(String key)
Session
String
under the given key or
null
if no such key exists.getString
in interface Session
public String getString(String key, String def)
Session
String
under the given key or
the given default if no such key exists.getString
in interface Session
public boolean getBoolean(String key)
Session
boolean
under the given key. If no such
key exists, an IllegalArgumentException
will be
thrown.getBoolean
in interface Session
public boolean getBoolean(String key, boolean def)
Session
boolean
under the given key. If no such
key exists, the given default will be returned.getBoolean
in interface Session
public int getInt(String key)
Session
Object
under the given key. If no such
key exists, an IllegalArgumentException
will be
thrown.getInt
in interface Session
public int getInt(String key, int def)
Session
Object
under the given key. If no such
key exists, the given default
will be returned.getInt
in interface Session
public boolean contains(String key)
Session
contains
in interface Session
public boolean isTrue(String key)
Session
true
if an extry exists for the given key
and the value is either a boolean
having value
true
, the string "true", or the string "yes". If
no entry exists for the given key, false is returned.isTrue
in interface Session
public boolean isFalse(String key)
Session
true
if an extry exists for the given key
and the value is either a boolean
having value
false
, the string "false", or the string "no". If
no entry exists for the given key, false is returned.isFalse
in interface Session
public boolean isNotTrue(String key)
Session
true
if no entry exists for the given key,
the value is either a boolean
having value
false
, or any string other than "true" or "yes".isNotTrue
in interface Session
public boolean isNotFalse(String key)
Session
true
if no entry exists for the given key,
the value is either a boolean
having value
true
, or any string other than "false" or "no".isNotFalse
in interface Session
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |