|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bloomberglp.blpapi.Constant
public abstract class Constant
Represents a constant value in the schema. Constants can be any of the following DataTypes: BOOL, CHAR, BYTE, INT32, INT64, FLOAT32, FLOAT64, STRING, DATE, TIME, DATETIME. As well as the constants value this class also provides access to the symbolic name, description and status of the constant. Constants are read-only and always created by the API, never by the application.
Constructor Summary | |
---|---|
Constant()
|
Method Summary | |
---|---|
abstract Schema.Datatype |
datatype()
Return the Datatype used to represent the value of this Constant |
abstract java.lang.String |
description()
Returns a String containing a human readable description of this Constant |
abstract char |
getValueAsChar()
Return the value of this Constant as a char if it can be converted |
abstract Datetime |
getValueAsDate()
Deprecated. since 3.2.1 Use getValueAsDatetime() instead |
abstract Datetime |
getValueAsDatetime()
Return the value of this Constant as a Datetime if it can be converted |
abstract float |
getValueAsFloat32()
Return the value of this Constant as a Float32 if it can be converted |
abstract double |
getValueAsFloat64()
Return the value of this Constant as a Float64 if it can be converted |
abstract int |
getValueAsInt32()
Return the value of this Constant as an Int32 if it can be converted |
abstract long |
getValueAsInt64()
Return the value of this Constant as an Int64 if it can be converted |
abstract java.lang.String |
getValueAsString()
Return the value of this Constant as a String if it can be converted |
abstract Datetime |
getValueAsTime()
Deprecated. since 3.2.1 Use getValueAsDatetime() instead |
abstract Name |
name()
Returns the symbolic name of the constant |
abstract void |
setUserData(java.lang.Object userData)
Set the user data associated with this Constant to the specified userData. |
abstract Schema.Status |
status()
Returns the status of this Constant |
abstract java.lang.Object |
userData()
Returns the user data associated with this Constant. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Constant()
Method Detail |
---|
public abstract void setUserData(java.lang.Object userData)
userData
- user provided data that is to be associated with this
ConstantsListpublic abstract Name name()
public abstract java.lang.String description()
public abstract Schema.Status status()
Schema.Status
public abstract Schema.Datatype datatype()
public abstract char getValueAsChar()
InvalidConversionException
- if the value of this Constant cannot
be converted to a charpublic abstract int getValueAsInt32()
InvalidConversionException
- if the value of this Constant cannot
be converted to an Int32public abstract long getValueAsInt64()
InvalidConversionException
- if the value of this Constant cannot
be converted to an Int64public abstract float getValueAsFloat32()
InvalidConversionException
- if the value of this Constant cannot
be converted to a Float32public abstract double getValueAsFloat64()
InvalidConversionException
- if the value of this Constant cannot
be converted to a Float64public abstract java.lang.String getValueAsString()
InvalidConversionException
- if the value of this Constant cannot
be converted to a Stringpublic abstract Datetime getValueAsDatetime()
InvalidConversionException
- if the value of this Constant cannot
be converted to a Datetimepublic abstract Datetime getValueAsDate()
getValueAsDatetime()
instead
public abstract Datetime getValueAsTime()
getValueAsDatetime()
instead
public abstract java.lang.Object userData()
setUserData(Object)
has never been called for this Constant
then return null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |