this.name = name; this.ordinal = ordinal; int hashCode = name.hashCode(); hashCode = 29 * hashCode + ordinal; this.hashCode = hashCode;
int otherOrdinal = ( ( Classification ) o ).ordinal; if ( ordinal == otherOrdinal ) { return 0; } else if ( ordinal > otherOrdinal ) { return 1; } else { return -1; }
return compareTo( obj ) == 0;
return hashCode;
return name;
return ordinal;
return ( Classification ) INSTANCES.get( name );
if ( ordinal == null ) { return null; } switch ( ordinal.intValue() ) { case 0: return COOL; case 1: return LAME; default: throw new IllegalArgumentException( "unknown classification ordinal [" + ordinal + "]" ); }