mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 08:40:03 +00:00
Use ordinal instead of value for Gender.
This commit is contained in:
@@ -10,26 +10,12 @@ public enum Gender {
|
|||||||
/**
|
/**
|
||||||
* The male gender.
|
* The male gender.
|
||||||
*/
|
*/
|
||||||
MALE(0),
|
MALE,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The female gender.
|
* The female gender.
|
||||||
*/
|
*/
|
||||||
FEMALE(1);
|
FEMALE;
|
||||||
|
|
||||||
/**
|
|
||||||
* The numerical value used by the client.
|
|
||||||
*/
|
|
||||||
private final int value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the gender.
|
|
||||||
*
|
|
||||||
* @param value The numerical value.
|
|
||||||
*/
|
|
||||||
private Gender(int value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts this gender to an integer.
|
* Converts this gender to an integer.
|
||||||
@@ -37,7 +23,7 @@ public enum Gender {
|
|||||||
* @return The numerical value used by the client.
|
* @return The numerical value used by the client.
|
||||||
*/
|
*/
|
||||||
public int toInteger() {
|
public int toInteger() {
|
||||||
return value;
|
return ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user