# Class SortOrder

java.lang.Object
uk.ac.starlink.topcat.SortOrder

public class SortOrder extends Object
Defines a sorting order for a table. An instance of this class defines the ordering by which a sort is done, rather than a given row sequence.

Note that the sense (up or down) of the sort is selected separately than by this object.

Since:
  23 Feb 2004
Author:
  Mark Taylor (Starlink)

## Field Summary

Fields
Modifier and Type
Field
Description
`static final SortOrder`
`NONE`
SortOrder instance indicating the natural order of the data.

## Constructor Summary

Constructors
Constructor
Description
`SortOrder(String[] expressions)`
Constructs a new sort order based on a table column.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`String[]`
`getExpressions()`
Gives the expressions on which this table is based.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### NONE

public static final SortOrder NONE
SortOrder instance indicating the natural order of the data.

## Constructor Details

### SortOrder

public SortOrder(String[] expressions)
Constructs a new sort order based on a table column.

Parameters:
  `expressions` - list of JEL sort expressions, most significant first

## Method Details

### getExpressions

public String[] getExpressions()
Gives the expressions on which this table is based.

Returns:
  array of sort JEL expressions, most significant first

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`