public int compareTo( Object obj )
    {
        //right now only sort by the index.

        if ( obj instanceof StringEntry == false )
        {

            throw new IllegalArgumentException( "object must be a StringEntry" );
        }

        StringEntry se = (StringEntry) obj;

        if ( se.getIndex() < this.getIndex() )
        {
            return -1;
        }
        else if ( se.getIndex() == this.getIndex() )
        {
            return 0;
        }
        else
        {
            return 1;
        }

    }