Class CorrelationID

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

public final class CorrelationID extends Object
A key used to identify individual subscriptions or requests.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    CorrelationID(long value)
    Construct a correlation id object and initialize it with the specified long correlation data
     
    Construct a correlation id object and initialize it with the specified Object value correlation data
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests this CorrelationID for equality with another object
    int
    Return the hashcode value for this CorrelationID
    boolean
    Return true if this correlation id object was generated internally by the library false otherwise
    boolean
    Return true if this correlation id object was originally initialized with an Object value false otherwise
    boolean
    Return true if this correlation id object was originally initialized with a long value false otherwise
    Return the value of this correlation id as a Object value.
    Return a String form of this CorrelationID
    long
    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 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

      public CorrelationID(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 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

      public 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:
      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(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 Object
    • hashCode

      public int hashCode()
      Return the hashcode value for this CorrelationID
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Return a String form of this CorrelationID
      Overrides:
      toString in class Object