jumbo.euclid
Class SortableString

java.lang.Object
  |
  +--jumbo.euclid.SortableString

public class SortableString
extends java.lang.Object
implements Sortable

a String which can be sorted using ObjectArray. Very inefficient, but I'm tired of copying sort routines yet again.


Constructor Summary
SortableString(java.lang.String s)
           
 
Method Summary
 int compareTo(Sortable ss)
           
static void main(java.lang.String[] args)
           
static java.util.Vector sort(java.util.Vector v)
          sorts a vector of strings; not very efficient
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortableString

public SortableString(java.lang.String s)
Method Detail

compareTo

public int compareTo(Sortable ss)
Specified by:
compareTo in interface Sortable
Tags copied from interface: Sortable
Returns:
-1 if this < sortable; 1 if > sortable; 0 if equal

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

sort

public static java.util.Vector sort(java.util.Vector v)
                             throws java.lang.ClassCastException
sorts a vector of strings; not very efficient
Throws:
java.lang.Exception - non-String element

main

public static void main(java.lang.String[] args)