com.espertech.esper.type
Interface PrimitiveValue

All Known Implementing Classes:
BoolValue, ByteValue, DoubleValue, FloatValue, IntValue, LongValue, PrimitiveValueBase, ShortValue, StringValue

public interface PrimitiveValue

Classes implementing this interface are responsible for parsing, setting and getting the value of the different basic Java data types that occur in an event expression. Placeholders represent all literal values in event expressions and set values in prepared event expressions.


Method Summary
 PrimitiveValueType getType()
          Returns the type of primitive value this instance represents.
 java.lang.Object getValueObject()
          Returns a value object.
 void parse(java.lang.String value)
          Parse the string literal value into the specific data type.
 void parse(java.lang.String[] values)
          Parse the string literal values supplied in the array into the specific data type.
 void setBoolean(boolean x)
          Set a boolean value.
 void setByte(byte x)
          Set a byte value.
 void setDouble(double x)
          Set a double value.
 void setFloat(float x)
          Set a float value.
 void setInt(int x)
          Set an int value.
 void setLong(long x)
          Set a long value.
 void setShort(short x)
          Set a short value.
 void setString(java.lang.String x)
          Set a string value.
 

Method Detail

getValueObject

java.lang.Object getValueObject()
Returns a value object.

Returns:
value object

parse

void parse(java.lang.String value)
Parse the string literal value into the specific data type.

Parameters:
value - is the textual value to parse

parse

void parse(java.lang.String[] values)
Parse the string literal values supplied in the array into the specific data type.

Parameters:
values - are the textual values to parse

getType

PrimitiveValueType getType()
Returns the type of primitive value this instance represents.

Returns:
enum type of primitive

setBoolean

void setBoolean(boolean x)
                throws java.lang.UnsupportedOperationException
Set a boolean value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setByte

void setByte(byte x)
             throws java.lang.UnsupportedOperationException
Set a byte value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setDouble

void setDouble(double x)
               throws java.lang.UnsupportedOperationException
Set a double value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setFloat

void setFloat(float x)
              throws java.lang.UnsupportedOperationException
Set a float value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setInt

void setInt(int x)
            throws java.lang.UnsupportedOperationException
Set an int value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setLong

void setLong(long x)
             throws java.lang.UnsupportedOperationException
Set a long value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setShort

void setShort(short x)
              throws java.lang.UnsupportedOperationException
Set a short value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

setString

void setString(java.lang.String x)
               throws java.lang.UnsupportedOperationException
Set a string value.

Parameters:
x - is the value to set
Throws:
java.lang.UnsupportedOperationException - to indicate that the value cannot convert from boolean

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com