Package com.opengamma.strata.product.etd
Class EtdFuturePosition.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdFuturePosition>
-
- com.opengamma.strata.product.etd.EtdFuturePosition.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<EtdFuturePosition>
- Enclosing class:
- EtdFuturePosition
public static final class EtdFuturePosition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdFuturePosition>
The bean-builder forEtdFuturePosition.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EtdFuturePositionbuild()Objectget(String propertyName)EtdFuturePosition.Builderinfo(PositionInfo info)Sets the additional position information, defaulted to an empty instance.EtdFuturePosition.BuilderlongQuantity(double longQuantity)Sets the long quantity of the security.EtdFuturePosition.Buildersecurity(EtdFutureSecurity security)Sets the underlying security.EtdFuturePosition.Builderset(String propertyName, Object newValue)EtdFuturePosition.Builderset(org.joda.beans.MetaProperty<?> property, Object value)EtdFuturePosition.BuildershortQuantity(double shortQuantity)Sets the short quantity of the security.StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<EtdFuturePosition>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdFuturePosition>
-
set
public EtdFuturePosition.Builder set(String propertyName, Object newValue)
-
set
public EtdFuturePosition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<EtdFuturePosition>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdFuturePosition>
-
build
public EtdFuturePosition build()
-
info
public EtdFuturePosition.Builder info(PositionInfo info)
Sets the additional position information, defaulted to an empty instance.This allows additional information to be attached to the position.
- Parameters:
info- the new value, not null- Returns:
- this, for chaining, not null
-
security
public EtdFuturePosition.Builder security(EtdFutureSecurity security)
Sets the underlying security.- Parameters:
security- the new value, not null- Returns:
- this, for chaining, not null
-
longQuantity
public EtdFuturePosition.Builder longQuantity(double longQuantity)
Sets the long quantity of the security.This is the quantity of the underlying security that is held. The quantity cannot be negative, as that would imply short selling.
- Parameters:
longQuantity- the new value- Returns:
- this, for chaining, not null
-
shortQuantity
public EtdFuturePosition.Builder shortQuantity(double shortQuantity)
Sets the short quantity of the security.This is the quantity of the underlying security that has been short sold. The quantity cannot be negative, as that would imply the position is long.
- Parameters:
shortQuantity- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdFuturePosition>
-
-