org.omegahat.Models.Formulae.Expressions
Class IndexedFormulaName

java.lang.Object
  |
  +--antlr.BaseAST
        |
        +--antlr.CommonAST
              |
              +--org.omegahat.Environment.Parser.Parse.BasicExpression
                    |
                    +--org.omegahat.Environment.Parser.Parse.List
                          |
                          +--org.omegahat.Environment.Parser.Parse.Name
                                |
                                +--org.omegahat.Models.Formulae.Expressions.FormulaName
                                      |
                                      +--org.omegahat.Models.Formulae.Expressions.IndexedFormulaName
All Implemented Interfaces:
antlr.collections.AST, java.lang.Cloneable, Evaluable, ExpressionInt, ModelTermExpression, OmegaTokenTypes, java.lang.Runnable, java.io.Serializable, Subsettable, TreeNodeInt

public class IndexedFormulaName
extends FormulaName

Represents a "variable" name in a formula term indexed by one or more subscripts. The subscripts are interpreted in a formula-specific manner.

See Also:
Serialized Form

Field Summary
protected  List subscripts
          A list of subscript terms that can be simple names or expressions.
 
Fields inherited from class org.omegahat.Environment.Parser.Parse.List
elements, separator
 
Fields inherited from class org.omegahat.Environment.Parser.Parse.BasicExpression
children, comments, isActive, parent, POST, PRE
 
Fields inherited from class antlr.BaseAST
down, right
 
Fields inherited from interface org.omegahat.Environment.Parser.AntlrParser.OmegaTokenTypes
ABSTRACT, ARG_LIST, ARRAY_DECLARATOR, ARRAY_INIT, ASSIGN, BAND, BAND_ASSIGN, BLOCK, BNOT, BOR, BOR_ASSIGN, BREAK, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, CHAR_LITERAL, CLASS_DEF, COLON, COMMA, CONTINUE, CTOR_DEF, DEC, DIV, DIV_ASSIGN, DOT, DOTS, EAGER, ELEMENT_OP, EOF, EQUAL, ESC, EXPONENT, EXPONENT_OP, EXPR, EXTENDS_CLAUSE, FINAL, FLOAT_SUFFIX, FUNCTION, GE, GT, HEX_DIGIT, IDENT, IMPLEMENTS_CLAUSE, IMPORT, INC, INDEX_OP, INSTANCE_INIT, INSTANCEOF, INTERFACE_DEF, LABELED_STAT, LAND, LAZY, LBRACK, LCURLY, LE, LITERAL_abstract, LITERAL_boolean, LITERAL_break, LITERAL_byte, LITERAL_case, LITERAL_catch, LITERAL_char, LITERAL_class, LITERAL_const, LITERAL_continue, LITERAL_default, LITERAL_do, LITERAL_double, LITERAL_eager, LITERAL_else, LITERAL_extends, LITERAL_false, LITERAL_final, LITERAL_finally, LITERAL_float, LITERAL_for, LITERAL_function, LITERAL_global, LITERAL_if, LITERAL_implements, LITERAL_import, LITERAL_in, LITERAL_instanceof, LITERAL_int, LITERAL_interface, LITERAL_lazy, LITERAL_long, LITERAL_method, LITERAL_native, LITERAL_new, LITERAL_null, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_return, LITERAL_short, LITERAL_static, LITERAL_super, LITERAL_switch, LITERAL_synchronized, LITERAL_this, LITERAL_threadsafe, LITERAL_throw, LITERAL_throws, LITERAL_transient, LITERAL_true, LITERAL_try, LITERAL_void, LITERAL_while, LNOT, LOR, LPAREN, LT, METHOD, METHOD_CALL, METHOD_DEF, MINUS, MINUS_ASSIGN, MISSING_ARG, ML_COMMENT, MOD, MOD_ASSIGN, MODIFIERS, NOT_EQUAL, NULL_TREE_LOOKAHEAD, NUM_FLOAT, NUM_INT, NUM_LONG, OBJBLOCK, PACKAGE_DEF, PARAMETER_DEF, PARAMETERS, PLUS, PLUS_ASSIGN, POST_DEC, POST_INC, QUESTION, RBRACK, RCURLY, RETURN, RPAREN, SEMI, SEQUENCE_OP, SL, SL_ASSIGN, SL_COMMENT, SLIST, SR, SR_ASSIGN, STAR, STAR_ASSIGN, STATIC_INIT, STRING_LITERAL, SYNCHRONIZED, THROW, TRANSIENT, TYPE, TYPECAST, UNARY_MINUS, UNARY_PLUS, VARIABLE_DEF, VOCAB, WS
 
Constructor Summary
IndexedFormulaName()
          Empty constructor for degenerate initialization and later parameterization via the field accessors, and derived classes.
IndexedFormulaName(java.lang.String name)
          Regular constructor identifying the variable of interest with no subscripts.
IndexedFormulaName(java.lang.String name, List indeces)
          Create the object with the variable and a collection of subscript terms.
 
Method Summary
 java.lang.String asString()
           
 List subscripts()
          Accessor for the collection of subscripting terms.
 List subscripts(List els)
          Accessor to set the collection of subscripting terms.
 java.lang.String toString()
           
 
Methods inherited from class org.omegahat.Environment.Parser.Parse.Name
addElements, append, asClass, asClass, asObject, collapse, collapse, element, equals, eval, getReferencedVariables, hashCode, subset, substitute
 
Methods inherited from class org.omegahat.Environment.Parser.Parse.List
addElement, addElements, addElements, addResult, asString, asString, clear, clone, contains, copyElements, elementAt, elements, elementToString, eval, evalElement, evalElement, evalResult, getFirstChild, lastElement, parent, separator, separator, setElementAt, size, size, subset, subset, subset, toArray, toString
 
Methods inherited from class org.omegahat.Environment.Parser.Parse.BasicExpression
addChild, addComment, apply, apply, apply, children, children, comment, comment, depth, error, eval, evalInit, evaluationFrame, evaluator, getReferencedVariables, getReferencedVariables, isActive, isActive, parent, postComment, postComment, preComment, preComment, render, replaceChild, resolve, run, setParent, setParent, setParent, setParent, showComments, showComments, substitute
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, initialize, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getNextSibling, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omegahat.Environment.Parser.Parse.ExpressionInt
error, resolve, substitute
 
Methods inherited from interface org.omegahat.Environment.Parser.Parse.TreeNodeInt
addChild, children, depth, parent, parent, replaceChild
 
Methods inherited from interface org.omegahat.Environment.Language.Evaluable
eval
 

Field Detail

subscripts

protected List subscripts
A list of subscript terms that can be simple names or expressions.
Constructor Detail

IndexedFormulaName

public IndexedFormulaName(java.lang.String name)
Regular constructor identifying the variable of interest with no subscripts.

IndexedFormulaName

public IndexedFormulaName(java.lang.String name,
                          List indeces)
Create the object with the variable and a collection of subscript terms.

IndexedFormulaName

public IndexedFormulaName()
Empty constructor for degenerate initialization and later parameterization via the field accessors, and derived classes.
Method Detail

subscripts

public List subscripts()
Accessor for the collection of subscripting terms.

subscripts

public List subscripts(List els)
Accessor to set the collection of subscripting terms.

toString

public java.lang.String toString()
Overrides:
toString in class Name

asString

public java.lang.String asString()
Overrides:
asString in class Name