net.sf.ivmaidns.util
Interface Sortable

All Known Implementing Classes:
BooleanVector, ByteVector, CharVector, ConstPair, ConstVector, DNSName, DNSRecord, DoubleVector, FilterStorage, FloatVector, HashedStorage, IntStorage, IntVector, ListStorage, LongVector, ObjectStorage, ObjectVector, ShortVector, SortedStorage, Storage, TreeStorage, UnsignedInt, UnsignedLong

public interface Sortable

Interface for comparable/orderable objects. Any class implementing this interface allows semantic ordering (sorting) of its instances using its built-in 'greater-than' comparator method.

Version:
2.0
Author:
Ivan Maidanski

Method Summary
 boolean greaterThan(java.lang.Object obj)
          Tests for being semantically greater than the argument.
 

Method Detail

greaterThan

boolean greaterThan(java.lang.Object obj)
Tests for being semantically greater than the argument. The result is true if and only if obj is of expected type and this object is greater than the specified one. Important notes: in a particular final class int compareTo(Type val) throws NullPointerException method may be provided for user convenience.

Parameters:
obj - the second compared object (may be null).
Returns:
true if obj is comparable with this and this object is greater than obj, else false.
Since:
2.0