Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.presumo.jms.selector
Class JmsFloatLiteral  view JmsFloatLiteral download JmsFloatLiteral.java

java.lang.Object
  extended bycom.presumo.jms.selector.JmsOperand
      extended bycom.presumo.jms.selector.JmsDataType
          extended bycom.presumo.jms.selector.JmsNumericLiteral
              extended bycom.presumo.jms.selector.JmsFloatLiteral

final class JmsFloatLiteral
extends JmsNumericLiteral

Expression node to represent floating point literals


Field Summary
private  java.lang.Double data
           
private static java.util.Hashtable instances
           
protected  java.lang.String stringRepresentation
           
 
Fields inherited from class com.presumo.jms.selector.JmsOperand
evalNumber, JMS_BINARY_ADD, JMS_BINARY_AND, JMS_BINARY_DIV, JMS_BINARY_MULT, JMS_BINARY_OR, JMS_BINARY_SUB, JMS_BOOLEAN_LITERAL, JMS_EQUALS, JMS_FLOAT_LITERAL, JMS_GREATER, JMS_IDENTIFIER, JMS_INTEGER_LITERAL, JMS_IS, JMS_LESS, JMS_LIKE, JMS_NOT, JMS_STRING_LITERAL, lastEval, myEvalNumber, parents, refcount
 
Constructor Summary
protected JmsFloatLiteral(double newValue)
          Called by getInstance which controls instance creation.
 
Method Summary
(package private)  JmsNumericLiteral add(JmsNumericLiteral value)
           
protected  void delete(JmsOperand parent)
           
(package private)  JmsNumericLiteral div(JmsNumericLiteral value)
           
(package private)  JmsBooleanLiteral eq(JmsDataType value)
           
(package private)  JmsOperand evaluate(javax.jms.Message msg)
          Returns the object represented by this instance.
(package private)  JmsOperand evaluateOnce(javax.jms.Message msg)
          Returns the object represented by this instance.
(package private) static JmsFloatLiteral getInstance(double newValue)
          Psuedo-singleton access point.
(package private)  java.lang.Number getNumber()
           
(package private)  short getType()
          Used to identify this object in places where instanceof is inapplicable.
(package private) static JmsFloatLiteral getUniqueInstance(double newValue)
          During evaluation, JmsIdentifier needs to create JmsFloatLiterals.
(package private)  JmsBooleanLiteral gt(JmsNumericLiteral value)
           
(package private)  JmsBooleanLiteral lt(JmsNumericLiteral value)
           
(package private)  JmsNumericLiteral mult(JmsNumericLiteral value)
           
(package private)  JmsNumericLiteral sub(JmsNumericLiteral value)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
(package private)  java.lang.String unParse()
          Returns a String representing the SQL form of the filter which is logically equivilant.
 
Methods inherited from class com.presumo.jms.selector.JmsOperand
addParent, addParentRef, allParents, delete, getAllInstances, hasParent, incrementAllRefCounts, incrementRefCount, numberOfParents, printTree, removeParent, resetStoredEvals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

private java.lang.Double data

instances

private static java.util.Hashtable instances

stringRepresentation

protected java.lang.String stringRepresentation
Constructor Detail

JmsFloatLiteral

protected JmsFloatLiteral(double newValue)
Called by getInstance which controls instance creation.

Method Detail

getInstance

static JmsFloatLiteral getInstance(double newValue)
Psuedo-singleton access point. Only one instance for each long value will ever be created and returned.


getUniqueInstance

static JmsFloatLiteral getUniqueInstance(double newValue)
During evaluation, JmsIdentifier needs to create JmsFloatLiterals. These literals need not be singletons. This access point returns a non-singleton instance.


getNumber

java.lang.Number getNumber()
Specified by:
getNumber in class JmsNumericLiteral

eq

JmsBooleanLiteral eq(JmsDataType value)
               throws SelectorFalseException
Specified by:
eq in class JmsDataType

lt

JmsBooleanLiteral lt(JmsNumericLiteral value)
Specified by:
lt in class JmsNumericLiteral

gt

JmsBooleanLiteral gt(JmsNumericLiteral value)
Specified by:
gt in class JmsNumericLiteral

mult

JmsNumericLiteral mult(JmsNumericLiteral value)
Specified by:
mult in class JmsNumericLiteral

div

JmsNumericLiteral div(JmsNumericLiteral value)
Specified by:
div in class JmsNumericLiteral

add

JmsNumericLiteral add(JmsNumericLiteral value)
Specified by:
add in class JmsNumericLiteral

sub

JmsNumericLiteral sub(JmsNumericLiteral value)
Specified by:
sub in class JmsNumericLiteral

getType

short getType()
Used to identify this object in places where instanceof is inapplicable.

Specified by:
getType in class JmsOperand

delete

protected void delete(JmsOperand parent)
Overrides:
delete in class JmsOperand

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


evaluate

final JmsOperand evaluate(javax.jms.Message msg)
                   throws SelectorFalseException
Returns the object represented by this instance.

Specified by:
evaluate in class JmsOperand

evaluateOnce

final JmsOperand evaluateOnce(javax.jms.Message msg)
                       throws SelectorFalseException
Returns the object represented by this instance. Saves a method call on something that already has a constant evaluation time.

Overrides:
evaluateOnce in class JmsOperand

unParse

java.lang.String unParse()
Description copied from class: JmsOperand
Returns a String representing the SQL form of the filter which is logically equivilant.

Specified by:
unParse in class JmsOperand