public abstract class BaseFieldSet extends Object
Parent class of OrderFieldSet
and StrategyFieldSet
.
This class provides the general purpose setField(String, Object)
and
setFields(Map)
methods, which you can use to set the value of a field by
name rather than using one of the domain-specific setter methods on the child classes.
public BaseFieldSet setField(String key, Object value)
OrderFieldSet
or StrategyFieldSet
, but you can call
this method if you want to include your own custom fields on an Order
or
Strategy
.key
- The name of the field to set the value for.value
- The field value. This will be converted to a String using Object.toString()
unless it is
a BigDecimal, in which case it will be converted using BigDecimal.toPlainString()
IllegalArgumentException
- If:
OrderBuilder.getEditableFields()
then an exception
will be thrown if you try to set the same field name on the field set returned by calling
OrderBuilder.getFixedFields()
.public BaseFieldSet setFields(Map<String,Object> fields)
setField(String, Object)
multiple times.fields
- A map of field names and values.Copyright © 2015 Caplin Systems.