public class JythonObjectStore extends java.lang.Object
IdvObjectStore object and
 provides methods that are safe to use from Jython scripts.
 A secondary aim of this class is to be largely API-compatible with
 java.util.prefs.Preferences.
| Modifier and Type | Field and Description | 
|---|---|
| private ucar.unidata.idv.IdvObjectStore | idvStoreIdvObjectStoreused by the current McIDAS-V session. | 
| Modifier | Constructor and Description | 
|---|---|
| private  | JythonObjectStore(ucar.unidata.idv.IdvObjectStore store)Create a new  JythonObjectStorewrapper object. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | getBoolean(java.lang.String key,
          boolean defaultValue)Returns the  booleanvalue associated with the givenkey. | 
| char | getCharacter(java.lang.String key,
            char defaultValue)Returns the  charvalue associated with the givenkey. | 
| double | getDouble(java.lang.String key,
         double defaultValue)Returns the  doublevalue associated with the givenkey. | 
| float | getFloat(java.lang.String key,
        float defaultValue)Returns the  floatvalue associated with the givenkey. | 
| int | getInteger(java.lang.String key,
          int defaultValue)Returns the  intvalue associated with the givenkey. | 
| long | getLong(java.lang.String key,
       long defaultValue)Returns the  longvalue associated with the givenkey. | 
| <T> T | getObject(java.lang.String key,
         T defaultValue)Returns the object associated with the given  key. | 
| short | getShort(java.lang.String key,
        short defaultValue)Returns the  shortvalue associated with the givenkey. | 
| java.lang.String | getString(java.lang.String key,
         java.lang.String defaultValue)Returns the  Stringvalue associated with the givenkey. | 
| java.util.List<org.python.core.PyTuple> | items() | 
| java.util.List<org.python.core.PyTuple> | items(java.lang.String substring) | 
| java.util.Set<java.lang.String> | keys() | 
| java.util.Set<java.lang.String> | keys(java.lang.String substring) | 
| java.lang.String | listItems() | 
| java.lang.String | listKeys() | 
| java.lang.String | listMatchingItems(java.lang.String substring) | 
| java.lang.String | listMatchingKeys(java.lang.String substring) | 
| static JythonObjectStore | newInstance(McIDASV mcidasv)Return a new  JythonObjectStoreinstance. | 
| void | putBoolean(java.lang.String key,
          boolean value)Associates the given  keywith the givenbooleanvalue. | 
| void | putCharacter(java.lang.String key,
            char value)Associates the given  keywith the givencharvalue. | 
| void | putDouble(java.lang.String key,
         double value)Associates the given  keywith the givendoublevalue. | 
| void | putFloat(java.lang.String key,
        float value)Associates the given  keywith the givenfloatvalue. | 
| void | putInteger(java.lang.String key,
          int value)Associates the given  keywith the givenintvalue. | 
| void | putLong(java.lang.String key,
       long value)Associates the given  keywith the givenlongvalue. | 
| <T> void | putObject(java.lang.String key,
         T value)Associates the given  keywith the given object. | 
| void | putShort(java.lang.String key,
        short value)Associates the given  keywith the givenshortvalue. | 
| void | putString(java.lang.String key,
         java.lang.String value)Associates the given  keywith the givenStringvalue. | 
| void | remove(java.lang.String key)Removes the value associated with the given  key(if any). | 
private final ucar.unidata.idv.IdvObjectStore idvStore
IdvObjectStore used by the current McIDAS-V session.private JythonObjectStore(ucar.unidata.idv.IdvObjectStore store)
JythonObjectStore wrapper object.store - McIDAS-V object store. Cannot be null.java.lang.NullPointerException - if store is null.public static JythonObjectStore newInstance(McIDASV mcidasv)
JythonObjectStore instance.
 Use this method rather than the constructor.
mcidasv - McIDAS-V instance that represents current session. Cannot
 be null.JythonObjectStore class.java.lang.NullPointerException - if mcidasv is null.public void remove(java.lang.String key)
key (if any).key - Key whose associated value is to be removed. Cannot be
 null.java.lang.NullPointerException - if key is null.public <T> T getObject(java.lang.String key, T defaultValue)
key. If key
 does not exist, defaultValue is returned.T - Type of object that will be returned.key - Key whose associated object is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.
 null is allowed.key or defaultValue if
 key is not valid.java.lang.NullPointerException - if key is null.public short getShort(java.lang.String key, short defaultValue)
short value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated short value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.short value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public char getCharacter(java.lang.String key, char defaultValue)
char value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated char value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.char value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
String value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated String value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.String value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public boolean getBoolean(java.lang.String key, boolean defaultValue)
boolean value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated boolean value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.boolean value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public double getDouble(java.lang.String key, double defaultValue)
double value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated double value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.double value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public float getFloat(java.lang.String key, float defaultValue)
float value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated float value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.float value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public int getInteger(java.lang.String key, int defaultValue)
int value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated int value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.int value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public long getLong(java.lang.String key, long defaultValue)
long value associated with the given key.
 If key does not exist, defaultValue is returned.key - Key whose associated long value is to be returned.
 Cannot be null.defaultValue - Value to be returned if key is not valid.long value associated with key or
 defaultValue if key is not valid.java.lang.NullPointerException - if key is null.public <T> void putObject(java.lang.String key, T value)
key with the given object.T - Type of object to store.key - Key to associate with the given value.
 Cannot be null.value - Object to associate with key. Cannot be
 null.java.lang.NullPointerException - if either key or value is
 null.public void putShort(java.lang.String key, short value)
key with the given short value.key - Key to associate with the given value.
 Cannot be null.value - short value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public void putCharacter(java.lang.String key, char value)
key with the given char value.key - Key to associate with the given value.
 Cannot be null.value - char value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public void putString(java.lang.String key, java.lang.String value)
key with the given String value.key - Key to associate with the given value.
 Cannot be null.value - String value to associate with key.
 Cannot be null.java.lang.NullPointerException - if either key or value is
 null.public void putBoolean(java.lang.String key, boolean value)
key with the given boolean value.key - Key to associate with the given value.
 Cannot be null.value - boolean value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public void putDouble(java.lang.String key, double value)
key with the given double value.key - Key to associate with the given value.
 Cannot be null.value - double value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public void putFloat(java.lang.String key, float value)
key with the given float value.key - Key to associate with the given value.
 Cannot be null.value - float value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public void putInteger(java.lang.String key, int value)
key with the given int value.key - Key to associate with the given value.
 Cannot be null.value - int value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public void putLong(java.lang.String key, long value)
key with the given long value.key - Key to associate with the given value.
 Cannot be null.value - long value to associate with key.java.lang.NullPointerException - if either key or value is
 null.public java.util.Set<java.lang.String> keys()
public java.util.Set<java.lang.String> keys(java.lang.String substring)
public java.util.List<org.python.core.PyTuple> items()
public java.util.List<org.python.core.PyTuple> items(java.lang.String substring)
public java.lang.String listKeys()
public java.lang.String listMatchingKeys(java.lang.String substring)
public java.lang.String listItems()
public java.lang.String listMatchingItems(java.lang.String substring)