generic ranks

This commit is contained in:
Joshua Perry 2023-01-31 14:55:46 +00:00
parent 5fd15f1e51
commit b092be40c3
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package org.r0r5chach;
import java.util.Locale;
/**
* All levels a ValorantPlayer can be
* @author r0r5chach
*/
public enum Rank {
/**
* First Level
*/
BRONZE,
/**
* Second Level
*/
SILVER,
/**
* Third Level
*/
GOLD,
/**
* Four Level
*/
PLATINUM;
/**
* Get the name of a level
* @return a formatted string containing the level name
*/
public String getRank() {
return this.name().charAt(0) + this.name().substring(1).toLowerCase(Locale.ROOT); //Capitalizes the first letter and makes sure the other letters are lowercase
}
}