Compiere Looks 1.2.1

org.compiere.util
Class MSort

java.lang.Object
  |
  +--org.compiere.util.MSort
All Implemented Interfaces:
Comparator, Serializable

public final class MSort
extends Object
implements Comparator, Serializable

Class to Sort Data

Version:
$Id: MSort.java,v 1.1 2002/08/22 04:21:37 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 Object data
          The data
 int index
          Direct access index
 
Constructor Summary
MSort(int new_index, Object new_data)
          Constructor - Sort Entity
 
Method Summary
 int compare(Object o1, Object o2)
          Compare Data of two entities
 boolean equals(Object obj)
          Equal (based on data, ignores index)
 void setSortAsc(boolean ascending)
          Sort Ascending
 String toString()
          String Representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public int index
Direct access index


data

public Object data
The data

Constructor Detail

MSort

public MSort(int new_index,
             Object new_data)
Constructor - Sort Entity

Parameters:
new_index - index
new_data - data
Method Detail

setSortAsc

public void setSortAsc(boolean ascending)
Sort Ascending

Parameters:
ascending - if true sort ascending

compare

public int compare(Object o1,
                   Object o2)
Compare Data of two entities

Specified by:
compare in interface Comparator
Parameters:
o1 - object
o2 - object
Returns:
comparator

equals

public boolean equals(Object obj)
Equal (based on data, ignores index)

Specified by:
equals in interface Comparator
Overrides:
equals in class Object
Parameters:
obj - object
Returns:
true if equal

toString

public String toString()
String Representation

Overrides:
toString in class Object
Returns:
info

Compiere Looks 1.2.1

Copyright (c) 1999-2003 ComPiere, Inc. - Author: Jorg Janke