Packageflare.query
Classpublic class Match
InheritanceMatch Inheritance BinaryExpression Inheritance Expression

Expression operator for text matching operations. Performs prefix, suffix, containment, and regular expression matching.



Public Properties
 PropertyDefined by
 Inheritedleft : Expression
The left-hand-side sub-expression.
BinaryExpression
 InheritednumChildren : int
The number of sub-expressions that are children of this expression.
BinaryExpression
 Inheritedoperator : int
Code indicating the operation performed by this instance.
BinaryExpression
  operatorString : String
[read-only] Returns a string representation of the string matching operator.
Match
 Inheritedright : Expression
The right-hand-side sub-expression.
BinaryExpression
Protected Properties
 PropertyDefined by
 Inherited_left : Expression
The left-hand-side sub-expression.
BinaryExpression
 Inherited_op : int
Code indicating the operation perfomed by this instance.
BinaryExpression
 Inherited_right : Expression
The right-hand-side sub-expression.
BinaryExpression
Public Methods
 MethodDefined by
  
Match(op:int, left:*, right:*)
Create a new Match expression.
Match
  
Creates a cloned copy of the expression.
Match
  
Contains(left:*, right:*):Match
[static] Creates a new Match operator for matching string containment.
Match
  
EndsWith(left:*, right:*):Match
[static] Creates a new Match operator for matching a string suffix.
Match
  
eval(o:Object = null):*
Evaluates this expression with the given input object.
Match
 Inherited
[static] Utility method that maps an input value into an Expression.
Expression
 Inherited
Returns the sub-expression at the given index.
BinaryExpression
 Inherited
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this expression.
Expression
  
RegEx(left:*, right:*):Match
[static] Creates a new Match operator for matching a regular expression.
Match
 Inherited
setChildAt(idx:int, expr:Expression):Boolean
Set the sub-expression at the given index.
BinaryExpression
  
StartsWith(left:*, right:*):Match
[static] Creates a new Match operator for matching string prefix.
Match
 Inherited
toString():String
Returns a string representation of the expression.
BinaryExpression
 Inherited
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all sub-expressions.
Expression
Public Constants
 ConstantDefined by
  PREFIX : int = 0
[static] Indicates a prefix matching test.
Match
  REGEXP : int = 3
[static] Indicates a regular expression matching test.
Match
  SUFFIX : int = 1
[static] Indicates a suffix matching test.
Match
  WITHIN : int = 2
[static] Indicates a string containment test.
Match
Property detail
operatorStringproperty
operatorString:String  [read-only]

Returns a string representation of the string matching operator.

Implementation
    public function get operatorString():String
Constructor detail
Match()constructor
public function Match(op:int, left:*, right:*)

Create a new Match expression.

Parameters
op:int — the operation to perform
 
left:* — the left sub-expression
 
right:* — the right sub-expression
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.
Contains()method 
public static function Contains(left:*, right:*):Match

Creates a new Match operator for matching string containment.

Parameters
left:* — the left-hand input expression
 
right:* — the right-hand input expression

Returns
Match — the new Match operator
EndsWith()method 
public static function EndsWith(left:*, right:*):Match

Creates a new Match operator for matching a string suffix.

Parameters
left:* — the left-hand input expression
 
right:* — the right-hand input expression

Returns
Match — the new Match operator
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
RegEx()method 
public static function RegEx(left:*, right:*):Match

Creates a new Match operator for matching a regular expression.

Parameters
left:* — the left-hand input expression
 
right:* — the right-hand input expression

Returns
Match — the new Match operator
StartsWith()method 
public static function StartsWith(left:*, right:*):Match

Creates a new Match operator for matching string prefix.

Parameters
left:* — the left-hand input expression
 
right:* — the right-hand input expression

Returns
Match — the new Match operator
Constant detail
PREFIXconstant
public static const PREFIX:int = 0

Indicates a prefix matching test.

REGEXPconstant 
public static const REGEXP:int = 3

Indicates a regular expression matching test.

SUFFIXconstant 
public static const SUFFIX:int = 1

Indicates a suffix matching test.

WITHINconstant 
public static const WITHIN:int = 2

Indicates a string containment test.