Project Wonder 5.0.0.8795

er.extensions.foundation
Class ERXArrayUtilities.UniqueOperator

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

public static class ERXArrayUtilities.UniqueOperator
extends Object

Define an NSArray.Operator for the key unique.

This allows for key value paths like:

myArray.valueForKeyPath("@unique.someOtherPath");

Which in this case would return only those objects which are unique in myArray.


Constructor Summary
ERXArrayUtilities.UniqueOperator()
          public empty constructor
 
Method Summary
 Object compute(NSArray array, String keypath)
          Removes duplicates.
 NSArray contents(NSArray array, String keypath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXArrayUtilities.UniqueOperator

public ERXArrayUtilities.UniqueOperator()
public empty constructor

Method Detail

compute

public Object compute(NSArray array,
                      String keypath)
Removes duplicates.

Parameters:
array - array to be filtered.
keypath - name of fetch specification.
Returns:
immutable filtered array.

contents

public NSArray contents(NSArray array,
                        String keypath)

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

Copyright © 2002 – 2007 Project Wonder.