net.wotonomy.foundation
Class NSComparator

java.lang.Object
  extended by net.wotonomy.foundation.NSComparator
All Implemented Interfaces:
java.util.Comparator
Direct Known Subclasses:
NSComparator._NSSelectorComparator, NSTimeZone.__NSTZPeriodComparator

public abstract class NSComparator
extends java.lang.Object
implements java.util.Comparator

An object that compares two other objects. As a convenience, it also implements java.util.Comparator.

Version:
$Revision: 913 $
Author:
cgruber@israfil.net, $Author: cgruber $

Nested Class Summary
protected static class NSComparator._NSSelectorComparator
           
static class NSComparator.ComparisonException
           
 
Field Summary
static NSComparator AscendingCaseInsensitiveStringComparator
           
static NSComparator AscendingNumberComparator
           
static NSComparator AscendingStringComparator
           
static NSComparator AscendingTimestampComparator
           
static NSComparator DescendingCaseInsensitiveStringComparator
           
static NSComparator DescendingNumberComparator
           
static NSComparator DescendingStringComparator
           
static NSComparator DescendingTimestampComparator
           
static int OrderedAscending
           
static int OrderedDescending
           
static int OrderedSame
           
 
Constructor Summary
NSComparator()
           
 
Method Summary
static int _compareObjects(java.lang.Comparable comparable, java.lang.Comparable comparable1)
           
abstract  int compare(java.lang.Object obj, java.lang.Object obj1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

AscendingStringComparator

public static final NSComparator AscendingStringComparator

DescendingStringComparator

public static final NSComparator DescendingStringComparator

AscendingCaseInsensitiveStringComparator

public static final NSComparator AscendingCaseInsensitiveStringComparator

DescendingCaseInsensitiveStringComparator

public static final NSComparator DescendingCaseInsensitiveStringComparator

AscendingNumberComparator

public static final NSComparator AscendingNumberComparator

DescendingNumberComparator

public static final NSComparator DescendingNumberComparator

AscendingTimestampComparator

public static final NSComparator AscendingTimestampComparator

DescendingTimestampComparator

public static final NSComparator DescendingTimestampComparator

OrderedAscending

public static final int OrderedAscending
See Also:
Constant Field Values

OrderedSame

public static final int OrderedSame
See Also:
Constant Field Values

OrderedDescending

public static final int OrderedDescending
See Also:
Constant Field Values
Constructor Detail

NSComparator

public NSComparator()
Method Detail

compare

public abstract int compare(java.lang.Object obj,
                            java.lang.Object obj1)
                     throws java.lang.ClassCastException
Specified by:
compare in interface java.util.Comparator
Throws:
java.lang.ClassCastException

_compareObjects

public static int _compareObjects(java.lang.Comparable comparable,
                                  java.lang.Comparable comparable1)


Copyright © 2006 null. All Rights Reserved.