public static final class GenericSecurityPosition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<GenericSecurityPosition>
GenericSecurityPosition
.Modifier and Type | Method and Description |
---|---|
GenericSecurityPosition |
build() |
Object |
get(String propertyName) |
GenericSecurityPosition.Builder |
info(PositionInfo info)
Sets the additional position information, defaulted to an empty instance.
|
GenericSecurityPosition.Builder |
longQuantity(double longQuantity)
Sets the long quantity of the security.
|
GenericSecurityPosition.Builder |
security(GenericSecurity security)
Sets the underlying security.
|
GenericSecurityPosition.Builder |
set(org.joda.beans.MetaProperty<?> property,
Object value) |
GenericSecurityPosition.Builder |
set(String propertyName,
Object newValue) |
GenericSecurityPosition.Builder |
shortQuantity(double shortQuantity)
Sets the short quantity of the security.
|
String |
toString() |
public Object get(String propertyName)
get
in interface org.joda.beans.BeanBuilder<GenericSecurityPosition>
get
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<GenericSecurityPosition>
public GenericSecurityPosition.Builder set(String propertyName, Object newValue)
public GenericSecurityPosition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set
in interface org.joda.beans.BeanBuilder<GenericSecurityPosition>
set
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<GenericSecurityPosition>
public GenericSecurityPosition build()
public GenericSecurityPosition.Builder info(PositionInfo info)
This allows additional information to be attached to the position.
info
- the new value, not nullpublic GenericSecurityPosition.Builder security(GenericSecurity security)
security
- the new value, not nullpublic GenericSecurityPosition.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 GenericSecurityPosition.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<GenericSecurityPosition>
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.