net.wotonomy.control
Class EOSortOrdering

java.lang.Object
  extended by net.wotonomy.control.EOSortOrdering
All Implemented Interfaces:
java.io.Serializable, EOKeyValueArchiving

public class EOSortOrdering
extends java.lang.Object
implements java.io.Serializable, EOKeyValueArchiving

EOSortOrdering defines a sort key and operation. DisplayGroups use lists of EOSortOrdering to determine how to order their items.

Version:
$Revision: 894 $
Author:
michael@mpowers.net, $Author: cgruber $
See Also:
Serialized Form

Field Summary
static net.wotonomy.foundation.NSSelector CompareAscending
          Sorts items in ascending order.
static net.wotonomy.foundation.NSSelector CompareCaseInsensitiveAscending
          Sorts items' string representations in ascending order in a case insensitive manner.
static net.wotonomy.foundation.NSSelector CompareCaseInsensitiveDescending
          Sorts items' string representations in descending order in a case insensitive manner.
static net.wotonomy.foundation.NSSelector CompareDescending
          Sorts items in descending order.
protected  java.lang.String key
           
protected  net.wotonomy.foundation.NSSelector selector
           
 
Constructor Summary
EOSortOrdering(java.lang.String aKey, java.util.Comparator aComparator)
          Constructor creates an EOSortOrdering that uses the specified key and comparator.
EOSortOrdering(java.lang.String aKey, net.wotonomy.foundation.NSSelector aSelector)
          Constructor creates an EOSortOrdering that uses the specified key and selector.
 
Method Summary
static java.lang.Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver arch)
           
 void encodeWithKeyValueArchiver(EOKeyValueArchiver arch)
           
 boolean equals(java.lang.Object anObject)
           
 java.lang.String key()
          Returns the property key.
 net.wotonomy.foundation.NSSelector selector()
          Returns the selector.
static void sortArrayUsingKeyOrderArray(java.util.List anObjectList, java.util.List aSortOrderingList)
          Sorts the specified list in place according to the specified list of EOSortOrderings.
static net.wotonomy.foundation.NSArray sortedArrayUsingKeyOrderArray(java.util.List anObjectList, java.util.List aSortOrderingList)
          Sorts the specified list in place according to the specified list of EOSortOrderings.
static EOSortOrdering sortOrderingWithKey(java.lang.String key, net.wotonomy.foundation.NSSelector selector)
          Factory-style constructor returns a new EOSortOrdering instance with the specified key and selector.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CompareAscending

public static final net.wotonomy.foundation.NSSelector CompareAscending
Sorts items in ascending order.


CompareDescending

public static final net.wotonomy.foundation.NSSelector CompareDescending
Sorts items in descending order.


CompareCaseInsensitiveAscending

public static final net.wotonomy.foundation.NSSelector CompareCaseInsensitiveAscending
Sorts items' string representations in ascending order in a case insensitive manner.


CompareCaseInsensitiveDescending

public static final net.wotonomy.foundation.NSSelector CompareCaseInsensitiveDescending
Sorts items' string representations in descending order in a case insensitive manner.


key

protected java.lang.String key

selector

protected net.wotonomy.foundation.NSSelector selector
Constructor Detail

EOSortOrdering

public EOSortOrdering(java.lang.String aKey,
                      net.wotonomy.foundation.NSSelector aSelector)
Constructor creates an EOSortOrdering that uses the specified key and selector. Neither may be null.


EOSortOrdering

public EOSortOrdering(java.lang.String aKey,
                      java.util.Comparator aComparator)
Constructor creates an EOSortOrdering that uses the specified key and comparator. Neither may be null. Not in the spec.

Method Detail

sortOrderingWithKey

public static EOSortOrdering sortOrderingWithKey(java.lang.String key,
                                                 net.wotonomy.foundation.NSSelector selector)
Factory-style constructor returns a new EOSortOrdering instance with the specified key and selector. Neither may be null.


key

public java.lang.String key()
Returns the property key.


selector

public net.wotonomy.foundation.NSSelector selector()
Returns the selector.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object anObject)
Overrides:
equals in class java.lang.Object

sortArrayUsingKeyOrderArray

public static void sortArrayUsingKeyOrderArray(java.util.List anObjectList,
                                               java.util.List aSortOrderingList)
Sorts the specified list in place according to the specified list of EOSortOrderings. The items will be sorted first by the first ordering, and items with equal values for that property will be sorted by the next ordering, and so on.


sortedArrayUsingKeyOrderArray

public static net.wotonomy.foundation.NSArray sortedArrayUsingKeyOrderArray(java.util.List anObjectList,
                                                                            java.util.List aSortOrderingList)
Sorts the specified list in place according to the specified list of EOSortOrderings. The items will be sorted first by the first ordering, and items with equal values for that property will be sorted by the next ordering, and so on.


decodeWithKeyValueUnarchiver

public static java.lang.Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver arch)

encodeWithKeyValueArchiver

public void encodeWithKeyValueArchiver(EOKeyValueArchiver arch)
Specified by:
encodeWithKeyValueArchiver in interface EOKeyValueArchiving


Copyright © 2006 null. All Rights Reserved.