Packageflare.util
Classpublic class Filter

Utility methods for creating filter functions. The static $() method takes an arbitrary object and generates a corresponding filter function.

Filter functions are functions that take one argument and return a Boolean value. The input argument to a filter function passes the filter if the function returns true and fails the filter if the function returns false.



Public Methods
 MethodDefined by
  
Constructor, throws an error if called, as this is an abstract class.
Filter
  
$(f:*):Function
[static] Convenience method that returns a filter function determined by the input object.
Filter
  
typeChecker(type:Class):Function
[static] Returns a filter function that performs type-checking.
Filter
Constructor detail
Filter()constructor
public function Filter()

Constructor, throws an error if called, as this is an abstract class.

Method detail
$()method
public static function $(f:*):Function

Convenience method that returns a filter function determined by the input object.

Parameters
f:* — an input object specifying the filter criteria

Returns
Function — the filter function
typeChecker()method 
public static function typeChecker(type:Class):Function

Returns a filter function that performs type-checking.

Parameters
type:Class — the Class type to check for

Returns
Function — a Boolean-valued type checking filter function