Bean Builder

com.adventnet.beans.utilbeans
Interface SortInterface

All Known Implementing Classes:
SortTableModel

public interface SortInterface

This interface must be implemented by any DataModel , which needs to be sorted using the Sort class

Version:
1.0
Author:
See Also:
SortTableModel, com.adventnet.beans.table.SortTable, Sort

Method Summary
 java.lang.Object elementAt(int index)
          Returns the object at index.
 boolean lt(java.lang.Object first, java.lang.Object second)
          Returns true if first < second.
 void sort(int sortColumn, boolean ascending)
          Sorts the column
 void swap(int i, int j)
          Exchanges the data at indeces i and j.
 

Method Detail

elementAt

public java.lang.Object elementAt(int index)
Returns the object at index.
Parameters:
index - The index value in the form of Integer.
Returns:
'Object'

swap

public void swap(int i,
                 int j)
Exchanges the data at indeces i and j.
Parameters:
i - The first element to be swapped.
j - The second element to be swapped.

lt

public boolean lt(java.lang.Object first,
                  java.lang.Object second)
Returns true if first < second.
Parameters:
first - The first object for validating.
second - The second object for validating.
Returns:
'boolean'

sort

public void sort(int sortColumn,
                 boolean ascending)
Sorts the column
Parameters:
sortColumn - The column position in the form of Integer
ascending - true,if the element is to be sorted.

Bean Builder

© 2001 - 2002 AdventNet Inc. Visit us at: http://www.adventnet.com