All pastes #466928 Raw Edit

Stuff

public java v1 · immutable
·published 2007-05-02 05:37 UTC
rendered paste body
public int compareTo(Object o)	{		if (!(o instanceof MyString))		{      throw new ClassCastException("A MyString object expected.");    }    MyString other = (MyString) o;		if (string.length() == other.length())		{			return string.compareTo(other.toString());		}		else		{			return string.length() > other.length() ? 1 : -1;		}	}