Class OvernightFuturePosition.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFuturePosition>
-
- com.opengamma.strata.product.index.OvernightFuturePosition.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<OvernightFuturePosition>
- Enclosing class:
- OvernightFuturePosition
public static final class OvernightFuturePosition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFuturePosition>
The bean-builder forOvernightFuturePosition.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OvernightFuturePositionbuild()Objectget(String propertyName)OvernightFuturePosition.Builderinfo(PositionInfo info)Sets the additional position information, defaulted to an empty instance.OvernightFuturePosition.BuilderlongQuantity(double longQuantity)Sets the long quantity of the security.OvernightFuturePosition.Builderproduct(OvernightFuture product)Sets the future that was traded.OvernightFuturePosition.Builderset(String propertyName, Object newValue)OvernightFuturePosition.Builderset(org.joda.beans.MetaProperty<?> property, Object value)OvernightFuturePosition.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<OvernightFuturePosition>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFuturePosition>
-
set
public OvernightFuturePosition.Builder set(String propertyName, Object newValue)
-
set
public OvernightFuturePosition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<OvernightFuturePosition>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFuturePosition>
-
build
public OvernightFuturePosition build()
-
info
public OvernightFuturePosition.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
-
product
public OvernightFuturePosition.Builder product(OvernightFuture product)
Sets the future that was traded.The product captures the contracted financial details.
- Parameters:
product- the new value, not null- Returns:
- this, for chaining, not null
-
longQuantity
public OvernightFuturePosition.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 OvernightFuturePosition.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<OvernightFuturePosition>
-
-