@Override
	public int compare( Object o1, Object o2 )
	{
		if( (o1 == null) || !(o1 instanceof XLSRecord) || (o2 == null) || !(o2 instanceof XLSRecord) )
		{
			throw new ClassCastException();
		}

		XLSRecord rec1 = (XLSRecord) o1;
		XLSRecord rec2 = (XLSRecord) o2;

		if( !rec1.isValueForCell() || !rec2.isValueForCell() )
		{
			throw new ClassCastException();
		}

		int diff = rec1.getRowNumber() - rec2.getRowNumber();
		if( diff != 0 )
		{
			return diff;
		}

		return rec1.getColNumber() - rec2.getColNumber();
	}