ERXArrayUtilities.LimitOperator Class Reference

Inherits er::extensions::foundation::ERXArrayUtilities::BaseOperator.

Collaboration diagram for ERXArrayUtilities.LimitOperator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Object compute (NSArray<?> array, String keypath)
 LimitOperator ()


Detailed Description

Define an NSArray.Operator for the key limit, which is similar to subarrayWithRange except it is always from 0 to the limit value. If the limit specified is larger than the size of the array, the entire array will be returned.


This allows for key value paths like:

myArray.valueForKeyPath("@limit.10.someOtherPath");

Which in this case would return the first 10 objects in myArray before continuing to process someOtherPath.

See also:
BaseOperator

Constructor & Destructor Documentation

LimitOperator (  ) 

Constructs a new LimitOperator


Member Function Documentation

Object compute ( NSArray<?>  array,
String  keypath 
)

Computes the subarray of the given array.

Parameters:
array array to be truncated.
keypath the key path to follow after truncation.
Returns:
the value produced by following the keypath after truncation.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:12 2012 for Project Wonder by  doxygen 1.5.8