story.dbcore.grammars
Class ReturnValue

java.lang.Object
  extended by story.dbcore.grammars.ReturnValue
Direct Known Subclasses:
ReturnValue

public class ReturnValue
extends java.lang.Object

This object represents a value in a parse tree. It is a wrapper for several fields: an Object, a Vector of arguments (in case the parser picked up some arguments following the serialization of the object), and the Class of the object.

This class was made necessary a the design requirement where arguments must sometimes sometimes be parsed long before they are used during parsing; they must travel atomically with the ID they follow.


Constructor Summary
ReturnValue()
          Constructor with nothing
ReturnValue(java.lang.Object value)
          Constructor without arguments
ReturnValue(java.lang.Object value, ArgumentVector arguments)
          Constructor with arguments
 
Method Summary
 ArgumentVector arguments()
          Return the arguments of the value.
 boolean argumentsPresent()
          Return true iff there are arguments for the value.
 java.lang.Object value()
          Return the value.
 java.lang.Class valueClass()
          Return the class of the value
 java.lang.String valueClassString()
          Return the class of the value as a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnValue

public ReturnValue(java.lang.Object value)
Constructor without arguments


ReturnValue

public ReturnValue(java.lang.Object value,
                   ArgumentVector arguments)
Constructor with arguments


ReturnValue

public ReturnValue()
Constructor with nothing

Method Detail

valueClassString

public java.lang.String valueClassString()
Return the class of the value as a string.


valueClass

public java.lang.Class valueClass()
Return the class of the value


value

public java.lang.Object value()
Return the value.


arguments

public ArgumentVector arguments()
Return the arguments of the value.


argumentsPresent

public boolean argumentsPresent()
Return true iff there are arguments for the value.



Copyright © 2011 David K. Elson. All Rights Reserved.