condor.classad
Class ListExpr

java.lang.Object
  |
  +--condor.classad.Expr
        |
        +--condor.classad.ListExpr

public class ListExpr
extends Expr

A list of expressions. An internal (non-leaf) node of an expression tree representing the list-construction operator { expr, expr, ... }.

Version:
1.2
Author:
Marvin Solomon
See Also:
Expr

Fields inherited from class condor.classad.Expr
ABSOLUTE_TIME, AND, ATTRIBUTE, BIT_COMPLEMENT, BITAND, BITOR, BITXOR, BOOLEAN, BRIEF, CALL, COMPACT, COND, dblevel, DIFFERENT, DIV, EQUAL, ERROR, formatFlags, formatIndent, GREATER, GREATER_EQ, INTEGER, LEFT_SHIFT, LESS, LESS_EQ, LIST, MAXPREC, MINIMAL_PARENTHESES, MINUS, MOD, MULTI_LINE_ADS, MULTI_LINE_LISTS, NO_ESCAPE_STRINGS, NOT, NOT_EQUAL, OP, opName, OR, PLUS, READABLE, REAL, RECORD, RELATIVE_TIME, RIGHT_SHIFT, SAME, SELECTION, SHOW_ERROR_DETAIL, SHOW_INSTANCES, STRING, SUBSCRIPT, TIMES, type, UMINUS, UNDEFINED, UPLUS, URIGHT_SHIFT
 
Constructor Summary
ListExpr(Vector v)
          Construct a list from a vector of expressions.
 
Method Summary
protected  int prec()
          The precedence of the operator in this expression node.
 int size()
          Get the length of this list.
 Expr sub(int i)
          Get a member of this list.
 String toString()
          Convert this Expr to a string.
protected  String typeName()
          The type of the expression.
 
Methods inherited from class condor.classad.Expr
db, db, disableFormatFlags, enableFormatFlags, eval, getFormatFlags, isConstant, isNormalForm, mark, mark, mark, reEval, select, setFormatFlags, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListExpr

public ListExpr(Vector v)
Construct a list from a vector of expressions.
Parameters:
contents - the array of expressions.
Method Detail

size

public int size()
Get the length of this list.
Returns:
the number of elements in this list

sub

public Expr sub(int i)
Get a member of this list.
Parameters:
i - the member to be retrieved.
Returns:
the ith member of this list, or an error Constant if i is out of bounds.

typeName

protected String typeName()
The type of the expression.
Overrides:
typeName in class Expr
Returns:
the string "list".

toString

public String toString()
Convert this Expr to a string. The exact format of the result is controled by the static fields Expr.formatFlags and Expr.formatIndent. The result may be multiple lines long (it may include embedded newlines and tabs), but it never ends with a newline.
Overrides:
toString in class Expr
Returns:
a string representation of the this Context
See Also:
Expr.formatFlags, Expr.formatIndent

prec

protected int prec()
The precedence of the operator in this expression node. Used to print expressions without superfluous parentheses.
Overrides:
prec in class Expr
Returns:
the precendence of this node.
See Also:
Expr.MINIMAL_PARENTHESES