com.dxfeed.glossary
Class AdditionalUnderlyings

java.lang.Object
  extended by com.dxfeed.glossary.AdditionalUnderlyings
All Implemented Interfaces:
java.io.Serializable

public class AdditionalUnderlyings
extends java.lang.Object
implements java.io.Serializable

Represents a set of additional underlyings for a given option. Each additional underlying has assiciated parameter called SPC (shares per contract) that specifies how many shares of additional underlying are delivered during settlement of the option. In cases when option delivers additional cash the SPC specifies an amount of how much cash is delivered.

See getText() and getMap() for details about used formats and representations.

See Also:
Serialized Form

Field Summary
static AdditionalUnderlyings EMPTY
          Empty additional underlyings - it has empty text and empty map.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,java.lang.Double> getMap()
          Returns internal representation of additional underlyings as a map from underlying symbol to its SPC.
 double getSPC(java.lang.String symbol)
          Returns SPC for specified underlying symbol or 0 is specified symbol is not found.
static double getSPC(java.lang.String text, java.lang.String symbol)
          Returns SPC for specified underlying symbol or 0 is specified symbol is not found.
 java.lang.String getText()
          Returns textual representation of additional underlyings in the format: TEXT ::= "" | LIST LIST ::= AU | AU "; " LIST AU ::= UNDERLYING " " SPC Where UNDERLYING is a symbol of underlying instrument and SPC is a number of shares per contract of that underlying.
 int hashCode()
           
 java.lang.String toString()
           
static AdditionalUnderlyings valueOf(java.util.Map<java.lang.String,java.lang.Double> map)
          Returns an instance of additional underlyings for specified internal representation.
static AdditionalUnderlyings valueOf(java.lang.String text)
          Returns an instance of additional underlyings for specified textual representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final AdditionalUnderlyings EMPTY
Empty additional underlyings - it has empty text and empty map.

Method Detail

valueOf

public static AdditionalUnderlyings valueOf(java.lang.String text)
Returns an instance of additional underlyings for specified textual representation. See getText() for format specification.

Throws:
java.lang.IllegalArgumentException - if text uses wrong format or contains invalid values

valueOf

public static AdditionalUnderlyings valueOf(java.util.Map<java.lang.String,java.lang.Double> map)
Returns an instance of additional underlyings for specified internal representation. See getMap() for details about internal representation.

Throws:
java.lang.IllegalArgumentException - if data contains invalid values

getSPC

public static double getSPC(java.lang.String text,
                            java.lang.String symbol)
Returns SPC for specified underlying symbol or 0 is specified symbol is not found. This method is equivalent to expression "valueOf(text).getSPC(symbol)" except it does not check correctness of format.


getText

public java.lang.String getText()
Returns textual representation of additional underlyings in the format:
 TEXT ::= "" | LIST
 LIST ::= AU | AU "; " LIST
 AU ::= UNDERLYING " " SPC
 
Where UNDERLYING is a symbol of underlying instrument and SPC is a number of shares per contract of that underlying. All additional underlyings are listed in the alphabetical order of underlying symbol. In cases when option settles with additional cash the underlying symbol will specify cash symbol and SPC will specify amount of cash.


getMap

public java.util.Map<java.lang.String,java.lang.Double> getMap()
Returns internal representation of additional underlyings as a map from underlying symbol to its SPC.


getSPC

public double getSPC(java.lang.String symbol)
Returns SPC for specified underlying symbol or 0 is specified symbol is not found.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object