public class PilarValue extends PilarParameter implements Value
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFVALUECLASS
Default value class is Double.
|
static String |
KEY_VALUECLASS
The name of number class used to parse the parameter from.
|
private Class<? extends Number> |
number
We use this class for parsing strings to numbers.
|
KEY_DRIVERNAME, KEY_PILARGETKEY_CACHEKEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
PilarValue(Map<String,String> prop)
Constructs a new pilar value from the properties.
|
| Modifier and Type | Method and Description |
|---|---|
Number |
getValue()
Gets the pilar response either from the cache or from the underlying
telescope and trie to parse it into a Number.
|
void |
init()
On init, try to load our parser class.
|
private boolean |
initParserClass()
We try to use the parser class for converting string answers from the
pilar driver to number instances.
|
double |
rescanned(String key,
String old,
String newval)
If the parser class changed, we try to rebuild it.
|
Number |
setValue(Number to)
Setting a number is not allowed.
|
getUncached, registerDriver, updateget, getCache, getCacheFormatted, setcreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiesreloadpublic static final String KEY_VALUECLASS
private static final String DEFVALUECLASS
public void init()
throws InitException
init in interface Initializableinit in class AbstractParameterInitExceptionprivate boolean initParserClass()
public double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class PilarParameterpublic Number getValue()
public Number setValue(Number to)
PilarDriver