Project Wonder 5.0.0.8795

er.extensions.foundation
Class ERXArrayUtilities.ObjectAtIndexOperator

java.lang.Object
  extended by er.extensions.foundation.ERXArrayUtilities.ObjectAtIndexOperator
All Implemented Interfaces:
NSArray.Operator
Enclosing class:
ERXArrayUtilities

public static class ERXArrayUtilities.ObjectAtIndexOperator
extends Object
implements NSArray.Operator

Define an NSArray.Operator for the key objectAtIndex.

This allows for key value paths like:

myArray.valueForKey("@objectAtIndex.3.firstName");


Constructor Summary
ERXArrayUtilities.ObjectAtIndexOperator()
          public empty constructor
 
Method Summary
 Object compute(NSArray array, String keypath)
          returns the keypath value for n-ths object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXArrayUtilities.ObjectAtIndexOperator

public ERXArrayUtilities.ObjectAtIndexOperator()
public empty constructor

Method Detail

compute

public Object compute(NSArray array,
                      String keypath)
returns the keypath value for n-ths object.

Specified by:
compute in interface NSArray.Operator
Parameters:
array - array to be checked.
keypath - integer value of index (zero based).
Returns:
null if array is empty or value is not in index, keypath value otherwise.

Last updated: Fri, Jan 9, 2009 • 04:35 AM EST

Copyright © 2002 – 2007 Project Wonder.