Style Intelligence v12.0

inetsoft.uql.path.expr
Class Expr

java.lang.Object
  extended by inetsoft.uql.path.ConditionExpression
      extended by inetsoft.uql.path.expr.Expr
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AlgoExpr, AndExpr, BetweenExpr, ComparisonExpr, DateExpr, ExistsExpr, FilterExpr, InExpr, LikeExpr, ListComparisonExpr, ListFuncExpr, ListMatchExpr, LiteralExpr, MatchExpr, NameExpr, NegateExpr, NotExpr, NullExpr, OrExpr, QueryExpr, VarExpr

public abstract class Expr
extends ConditionExpression

This is the base class for all other expr classes. It provides common utility methods.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.path.ConditionExpression
ALL, ANY, SOME
 
Constructor Summary
Expr()
           
 
Method Summary
static Object aggregate(String op, Object[] arr)
          Calculate the aggregate value of a collection of values.
static String[] append(String[] v1, String[] v2)
          Append two arrays.
static boolean booleanValue(Object val)
          Convert a value to a boolean.
static int compare(Object expr1, Object expr2)
          Compare to values.
static boolean compare(Object v1, String op, Object v2)
          Compare two values according to the operator.
static double doubleValue(Object val)
          Convert a value to a double.
abstract  Expr[] getExpressions()
          Get the expressions used in this expr.
static Object getScalar(Object val)
          Get a scalar value.
static String getScalarString(Object val)
          Get the scalar value as a string, apply formatting if necessary.
 String[] getVariables()
          Get all variables used in the condition.
static Object[] toArray(XNode node)
          Convert a node to an array.
static String toString(Object val)
          Convert a value to string.
 String toStringNot()
           
static Vector toVector(XNode node)
          Convert the first column of a table to a vector.
 
Methods inherited from class inetsoft.uql.path.ConditionExpression
execute, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expr

public Expr()
Method Detail

getVariables

public String[] getVariables()
Get all variables used in the condition.

Specified by:
getVariables in class ConditionExpression

booleanValue

public static boolean booleanValue(Object val)
Convert a value to a boolean.

Returns:
true if the value is a boolean true value, or not null.

doubleValue

public static double doubleValue(Object val)
Convert a value to a double.


getScalar

public static Object getScalar(Object val)
Get a scalar value. If a XNode is passed in and have children, the value of the first child is used as the scalar value.


getScalarString

public static String getScalarString(Object val)
Get the scalar value as a string, apply formatting if necessary.


compare

public static int compare(Object expr1,
                          Object expr2)
Compare to values.

Returns:
positive if expr1 is greater than expr2, 0 if they are equal, or negative if expr1 is less than expr2.

compare

public static boolean compare(Object v1,
                              String op,
                              Object v2)
Compare two values according to the operator.


toString

public static String toString(Object val)
Convert a value to string.


append

public static String[] append(String[] v1,
                              String[] v2)
Append two arrays.


toVector

public static Vector toVector(XNode node)
Convert the first column of a table to a vector.


toArray

public static Object[] toArray(XNode node)
Convert a node to an array.


aggregate

public static Object aggregate(String op,
                               Object[] arr)
Calculate the aggregate value of a collection of values.


toStringNot

public String toStringNot()

getExpressions

public abstract Expr[] getExpressions()
Get the expressions used in this expr. This is used for traversal down the expr tree.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.