edu.nrao.sss.sort
Interface Orderable

All Known Implementing Classes:
AngleSortKey, DoubleSortKey, EnumSortKey, EquatorialArcSortKey, IntSortKey, ReflectiveDoubleSortKey, ReflectiveEnumSortKey, ReflectiveIntSortKey, ReflectiveStringSortKey, SortKey, StringSortKey

public interface Orderable

An object that has a sort order.

Version Info:

$Revision: 593 $
$Date: 2007-05-07 15:54:14 -0600 (Mon, 07 May 2007) $
$Author: dharland $

Since:
2007-05-04
Author:
David M. Harland

Method Summary
 SortOrder getOrder()
          Returns the sort order.
 void setOrder(SortOrder newOrder)
          Sets the order to newOrder.
 

Method Detail

setOrder

void setOrder(SortOrder newOrder)
Sets the order to newOrder.

Implementing classes should handle a null parameter in some way other than merely saving it and waiting for a downstream NullPointerException. Typical responses would be to replace null with some valid value, such as SortOrder.NATURAL, or to throw an IllegalArgumentException.

Parameters:
newOrder - the new order for sorting.

getOrder

SortOrder getOrder()
Returns the sort order.

Implementing classes should guarantee that the returned value will never be null.

Returns:
the sort order.


Copyright © 2009. All Rights Reserved.