Normal
Hallo, Ich schaue mir gerade die equals Methode an, habe das aus dem Buch Java ist auch eine Insel:[CODE=java]@Overridepublic boolean equals( Object o ){ if ( o == null ) return false; if ( o == this ) return true; Club that = (Club) o; return this.numberOfPersons == that.numberOfPersons && this.sm == that.sm;}[/CODE]Ich verstehe nicht was der vergleich mit this sein soll. Was ist hier mit this gemeint ? Was wird da verglichen ?
Hallo, Ich schaue mir gerade die equals Methode an, habe das aus dem Buch Java ist auch eine Insel:
[CODE=java]@Override
public boolean equals( Object o )
{
if ( o == null )
return false;
if ( o == this )
return true;
Club that = (Club) o;
return this.numberOfPersons == that.numberOfPersons
&& this.sm == that.sm;
}[/CODE]
Ich verstehe nicht was der vergleich mit this sein soll. Was ist hier mit this gemeint ? Was wird da verglichen ?