Can someone please explain to me what the following code does. I am new to programming. I am having a hard time understanding what is meant by "the current object." This code is contained within a class that implements the Compareable interface. It has a conscutor that takes an int number and String description. It also has a get method for both number and description.
@Override
public int compareTo (Object o)
{
Item i = (Item) o;
if (this.getNumber () < i.getNumber())
return -1;
if (this.getNumber () > i.getNumber())
return 1;
return 0;