Package com.bloomberglp.blpapi
Class CorrelationID
java.lang.Object
com.bloomberglp.blpapi.CorrelationID
A key used to identify individual subscriptions or requests.
-
Constructor Summary
ConstructorDescriptionCorrelationID
(long value) Construct a correlation id object and initialize it with the specified long correlation dataCorrelationID
(CorrelationID from) CorrelationID
(Object value) Construct a correlation id object and initialize it with the specified Object value correlation data -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this CorrelationID for equality with another objectint
hashCode()
Return the hashcode value for this CorrelationIDboolean
Return true if this correlation id object was generated internally by the library false otherwiseboolean
isObject()
Return true if this correlation id object was originally initialized with an Object value false otherwiseboolean
isValue()
Return true if this correlation id object was originally initialized with a long value false otherwiseobject()
Return the value of this correlation id as a Object value.toString()
Return a String form of this CorrelationIDlong
value()
Return the value of this correlation id as a long value.
-
Constructor Details
-
CorrelationID
public CorrelationID(long value) Construct a correlation id object and initialize it with the specified long correlation data- Parameters:
value
- the long value to be used as the correlation data
-
CorrelationID
Construct a correlation id object and initialize it with the specified Object value correlation data- Parameters:
value
- the Object value to be used as the correlation data
-
CorrelationID
public CorrelationID() -
CorrelationID
-
-
Method Details
-
value
public long value()Return the value of this correlation id as a long value.Note that this function assumes that this correlation id object has been initialized with an long value.
- Returns:
- the long value that this correlation id was initialized with
- Throws:
IllegalStateException
- if this correlation id was not initialized with an long value
-
object
Return the value of this correlation id as a Object value.Note that this function assumes that this correlation id object has been initialized with an Object value.
- Returns:
- the Object value that this correlation id was initialized with
- Throws:
IllegalStateException
- if this correlation id was not initialized with an object
-
isInternal
public boolean isInternal()Return true if this correlation id object was generated internally by the library false otherwise -
isObject
public boolean isObject()Return true if this correlation id object was originally initialized with an Object value false otherwise -
isValue
public boolean isValue()Return true if this correlation id object was originally initialized with a long value false otherwise -
equals
Tests this CorrelationID for equality with another objectIf the other Object is not a CorrelationID this method immediately returns false. For two CorrelationID objects to be considered equal both the CorrelationIDs should have a long value or an Object value and the values should be equal
-
hashCode
public int hashCode()Return the hashcode value for this CorrelationID -
toString
Return a String form of this CorrelationID
-