Packageflare.query
Classpublic class IsA
InheritanceIsA Inheritance Expression

Expression operator that type checks a sub-expression.



Public Properties
 PropertyDefined by
  clause : Expression
The sub-expression clause to type check.
IsA
  numChildren : int
[read-only] The number of sub-expressions that are children of this expression.
IsA
  type : Class
[read-only] The class type to check for.
IsA
Public Methods
 MethodDefined by
  
IsA(type:Class, clause:* = null)
Creates a new IsA operator.
IsA
  
Creates a cloned copy of the expression.
IsA
  
eval(o:Object = null):*
Evaluates this expression with the given input object.
IsA
 Inherited
[static] Utility method that maps an input value into an Expression.
Expression
  
Returns the sub-expression at the given index.
IsA
  
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this expression.
IsA
  
setChildAt(idx:int, expr:Expression):Boolean
Set the sub-expression at the given index.
IsA
  
toString():String
Returns a string representation of the expression.
IsA
 Inherited
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all sub-expressions.
Expression
Property detail
clauseproperty
clause:Expression  [read-write]

The sub-expression clause to type check.

Implementation
    public function get clause():Expression
    public function set clause(value:Expression):void
numChildrenproperty 
numChildren:int  [read-only]

The number of sub-expressions that are children of this expression.

Implementation
    public function get numChildren():int
typeproperty 
type:Class  [read-only]

The class type to check for.

Implementation
    public function get type():Class
Constructor detail
IsA()constructor
public function IsA(type:Class, clause:* = null)

Creates a new IsA operator.

Parameters
type:Class — the class type to check for
 
clause:* (default = null) — the sub-expression clause to type check. If null, the input object (rather than a sub-property or expression result) will be type checked.
Method detail
clone()method
public override function clone():Expression

Creates a cloned copy of the expression. Recursively clones any sub-expressions.

Returns
Expression — the cloned expression.
eval()method 
public override function eval(o:Object = null):*

Evaluates this expression with the given input object.

Parameters
o:Object (default = null) — the input object to this expression

Returns
* — the result of evaluating the expression
getChildAt()method 
public override function getChildAt(idx:int):Expression

Returns the sub-expression at the given index.

Parameters
idx:int — the index of the child sub-expression

Returns
Expression — the requested sub-expression.
predicate()method 
public override function predicate(o:Object):Boolean

Boolean predicate that tests the output of evaluating this expression. Returns true if the expression evaluates to true, or a non-null or non-zero value. Returns false if the expression evaluates to false, or a null or zero value.

Parameters
o:Object — the input object to this expression

Returns
Boolean — the Boolean result of evaluating the expression
setChildAt()method 
public override function setChildAt(idx:int, expr:Expression):Boolean

Set the sub-expression at the given index.

Parameters
idx:int — the index of the child sub-expression
 
expr:Expression — the sub-expression to set

Returns
Boolean — true if the the sub-expression was successfully set, false otherwise
toString()method 
public override function toString():String

Returns a string representation of the expression.

Returns
String — this expression as a string value