|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ReadInfo
A generic store of key-value pairs whose contents are checked against certain conditions upon retrieval.
| Method Summary | ||
|---|---|---|
boolean |
contains(String key)
Checks whether the given key is associated with a value (which may or may not be null) in the receiver's map. |
|
String |
getName()
Returns the receiver's name. |
|
String |
getPath()
Returns the receiver's path name. |
|
Object |
getValue(String key)
Returns the value associated with the given key in the receiver's map. |
|
|
getValueIfInstanceOf(String key,
Class<T> cls)
Returns the value associated with the given key in the receiver's map, provided one is set and is either null or an object of the given class. |
|
Object |
getValueIfNonNull(String key)
Returns the value associated with the given key in the receiver's map, provided one is set and is not null. |
|
|
getValueIfNonNullInstanceOf(String key,
Class<T> cls)
Returns the value associated with the given key in the receiver's map, provided one is set and is non-null and an object of the given class. |
|
Object |
getValueIfSet(String key)
Returns the value associated with the given key in the receiver's map, provided one (which may be null) is set. |
|
| Method Detail |
|---|
String getName()
String getPath()
boolean contains(String key)
key - The key.
Object getValue(String key)
key - The key.
contains(String) to distinguish these
two cases.
Object getValueIfSet(String key)
throws InfoException
key - The key.
InfoException - Thrown if no value is associated with the
given key.
Object getValueIfNonNull(String key)
throws InfoException
key - The key.
InfoException - Thrown if no or a null value is
associated with the given key.
<T> T getValueIfInstanceOf(String key,
Class<T> cls)
throws InfoException
key - The key.cls - The class.
InfoException - Thrown if a no value is associated with
the given key, or if the value is non-null and of a class other
than the given one.
<T> T getValueIfNonNullInstanceOf(String key,
Class<T> cls)
throws InfoException
key - The key.cls - The class.
InfoException - Thrown if a no value is associated with
the given key, or if the value is null or of a class other than
the given one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||