ERXComparatorSelector Class Reference

Inherits com::webobjects::foundation::NSSelector.

Collaboration diagram for ERXComparatorSelector:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ERXComparatorSelector (Comparator comparator)
Object invoke (Object target, Object argument) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException

Private Attributes

Comparator _comparator


Detailed Description

ERXComparatorSelector allows you to pass an arbitrary Comparator instance as an NSSelector into EOSortOrdering for use with an in-memory sort. Note that this WILL NOT work for sorting directly in the database. This exploits the fact that EOSortOrdering calls selector.invoke(left, right) when you pass it an arbitrary selector to use.

 Example: ERXArrayUtilities.sortedArraySortedWithKey(array, "someKey", new ERXComparatorSelector(Collator.getInstance()))
 

Author:
mschrag

Constructor & Destructor Documentation

ERXComparatorSelector ( Comparator  comparator  ) 

Constructs a new ERXComparatorSelector.

Parameters:
comparator the backing comparator to sort with


Member Function Documentation

Object invoke ( Object  target,
Object  argument 
) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException


Member Data Documentation

Comparator _comparator [private]


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