N.b.: the map passed in is used as the internal data structure. Changing the original map
after construction will change the internal state of the DataHolder
.
Attributes | Name and Description |
---|---|
|
caplin.trading.trademodel.DataHolder(Object mMap)
Creates an instance of |
Attributes | Name and Description |
---|---|
|
void
append(caplin.trading.trademodel.DataHolder sourceDataHolder, String prefix)
Extracts all data from the supplied |
|
caplin.trading.trademodel.DataHolder
clone(String prefix)
Returns a copy of this object. |
|
String
get(String name)
Returns the data value with the specified name. |
|
Object
getDataAsMap()
Returns the data as a name/value pair map. |
|
Array
getFieldNames()
Returns an array of the names of all stored values. |
|
Object
getNonSeparated(String separator)
Returns the data field pairs that do not contain the specified separator. |
|
Object
getPrefixed(String prefix)
Returns the values with names which match the requested prefix. |
|
void
set(String name, String value)
Stores the value using the provided name. |
►
caplin.trading.trademodel.DataHolder(Object mMap)
Creates an instance of caplin.trading.trademodel.DataHolder
.
Object | mMap | If supplied, the DataHolder is initialised with the given map (Optional). |
►
void
append(caplin.trading.trademodel.DataHolder sourceDataHolder, String prefix)
Extracts all data from the supplied DataHolder
and appends it to this instance. Overwrites any existing
values with the same name.
caplin.trading.trademodel.DataHolder | sourceDataHolder | The DataHolder whose data will be
appended to this DataHolder . |
String | prefix | A prefix used to prepend to the appended field names. If no prefix is specified, the field names are not prefixed. |
►
caplin.trading.trademodel.DataHolder
clone(String prefix)
Returns a copy of this object.
String | prefix | The prefix that will be prepended to all the field names within the original data holder. |
►
String
get(String name)
Returns the data value with the specified name.
String | name | The name of value to return. |
►
Object
getDataAsMap()
Returns the data as a name/value pair map.
►
Array
getFieldNames()
Returns an array of the names of all stored values.
►
Object
getNonSeparated(String separator)
Returns the data field pairs that do not contain the specified separator.
For example, the invocation oData.getNonSeparated("_")
would only return the values that have names
which do not contain an underscore.
String | separator | The separator to check for. |
►
Object
getPrefixed(String prefix)
Returns the values with names which match the requested prefix.
String | prefix | The prefix of the requested data fields. |
►
void
set(String name, String value)
Stores the value using the provided name.
String | name | The name of the data field. |
String | value | The value to be stored. |