public static final class SecurityPosition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityPosition>
SecurityPosition
.Modifier and Type | Method and Description |
---|---|
SecurityPosition |
build() |
Object |
get(String propertyName) |
SecurityPosition.Builder |
info(PositionInfo info)
Sets the additional position information, defaulted to an empty instance.
|
SecurityPosition.Builder |
longQuantity(double longQuantity)
Sets the long quantity of the security.
|
SecurityPosition.Builder |
securityId(SecurityId securityId)
Sets the identifier of the underlying security.
|
SecurityPosition.Builder |
set(org.joda.beans.MetaProperty<?> property,
Object value) |
SecurityPosition.Builder |
set(String propertyName,
Object newValue) |
SecurityPosition.Builder |
shortQuantity(double shortQuantity)
Sets the quantity that was traded.
|
String |
toString() |
public Object get(String propertyName)
get
in interface org.joda.beans.BeanBuilder<SecurityPosition>
get
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityPosition>
public SecurityPosition.Builder set(String propertyName, Object newValue)
public SecurityPosition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set
in interface org.joda.beans.BeanBuilder<SecurityPosition>
set
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityPosition>
public SecurityPosition build()
public SecurityPosition.Builder info(PositionInfo info)
This allows additional information to be attached to the position.
info
- the new value, not nullpublic SecurityPosition.Builder securityId(SecurityId securityId)
This identifier uniquely identifies the security within the system.
securityId
- the new value, not nullpublic SecurityPosition.Builder longQuantity(double longQuantity)
This is the quantity of the underlying security that is held. The quantity cannot be negative, as that would imply short selling.
longQuantity
- the new valuepublic SecurityPosition.Builder shortQuantity(double shortQuantity)
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.
shortQuantity
- the new valuepublic String toString()
toString
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityPosition>
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.