com.bloomberglp.blpapi
Class CorrelationID

java.lang.Object
  extended by com.bloomberglp.blpapi.CorrelationID

public final class CorrelationID
extends java.lang.Object

A key used to identify individual subscriptions or requests.

Author:
Siva Somu (ssomu)

Constructor Summary
CorrelationID()
           
CorrelationID(CorrelationID from)
           
CorrelationID(long value)
          Construct a correlation id object and initialize it with the specified long correlation data
CorrelationID(java.lang.Object value)
          Construct a correlation id object and initialize it with the specified Object value correlation data
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests this CorrelationID for equality with another object
 int hashCode()
          Return the hashcode value for this CorrelationID
 boolean isInternal()
          Return true if this correlation id object was generated internally by the library false otherwise
 boolean isObject()
          Return true if this correlation id object was originally initialized with an Object value false otherwise
 boolean isValue()
          Return true if this correlation id object was originally initialized with a long value false otherwise
 java.lang.Object object()
          Return the value of this correlation id as a Object value.
 java.lang.String toString()
          Return a String form of this CorrelationID
 long value()
          Return the value of this correlation id as a long value.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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

public CorrelationID(java.lang.Object value)
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

public CorrelationID(CorrelationID from)
Method Detail

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:
java.lang.IllegalStateException - if this correlation id was not initialized with an long value

object

public java.lang.Object 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:
java.lang.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

public boolean equals(java.lang.Object obj)
Tests this CorrelationID for equality with another object

If 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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return the hashcode value for this CorrelationID

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Return a String form of this CorrelationID

Overrides:
toString in class java.lang.Object


Copyright © 2015 Bloomberg L.P.. All Rights Reserved.