Compoze Software, Inc.

com.compoze.util
Class SortableArrayComparator

java.lang.Object
  extended bycom.compoze.util.SortableArrayComparator
All Implemented Interfaces:
java.util.Comparator

public class SortableArrayComparator
extends java.lang.Object
implements java.util.Comparator

This class is a comparator that can order SortableArray objects.


Constructor Summary
SortableArrayComparator(int index)
          Constructor
SortableArrayComparator(int index, boolean bOrderAsc)
          Constructor
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares its two arguments for order.
 
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
 

Constructor Detail

SortableArrayComparator

public SortableArrayComparator(int index)
Constructor

Parameters:
index - index to compare by

SortableArrayComparator

public SortableArrayComparator(int index,
                               boolean bOrderAsc)
Constructor

Parameters:
index - index to compare by
bOrderAsc - if true, order ascending
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - the first object to compare
o2 - the second object to compare
See Also:
Comparator

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.