nl.tudelft.simulation.introspection.sortable
Class SortDefinition

java.lang.Object
  extended by nl.tudelft.simulation.introspection.sortable.SortDefinition
All Implemented Interfaces:
Sortable.Definition

public class SortDefinition
extends Object
implements Sortable.Definition

The SortDefinition.

(c) copyright 2002-2005-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
1.1 Apr 15, 2004
Author:
Niels Lang Peter Jacobs

Constructor Summary
SortDefinition(int fieldID, boolean ascending)
          constructs a new SortDefinition
 
Method Summary
 int getFieldID()
           
 boolean isAcendingSort()
          Returns whether this definition defines an ascending sort.
 void setAscending(boolean ascending)
          Allows dynamic definitions
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortDefinition

public SortDefinition(int fieldID,
                      boolean ascending)
constructs a new SortDefinition

Parameters:
fieldID - the fieldID
ascending - whether sorting should occur ascending
Method Detail

getFieldID

public int getFieldID()
Specified by:
getFieldID in interface Sortable.Definition
Returns:
Returns the field to which this sorting definition applies
See Also:
Sortable.Definition.getFieldID()

isAcendingSort

public boolean isAcendingSort()
Description copied from interface: Sortable.Definition
Returns whether this definition defines an ascending sort.

Specified by:
isAcendingSort in interface Sortable.Definition
Returns:
A 'false' return value implies a descending sort definition.
See Also:
#isAcendingSort()

setAscending

public void setAscending(boolean ascending)
Description copied from interface: Sortable.Definition
Allows dynamic definitions

Specified by:
setAscending in interface Sortable.Definition
Parameters:
ascending - whether the sort is ascending
See Also:
#setAscending(boolean)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.