- All Implemented Interfaces:
Serializable,Comparable<HairStyle>,Constable
An enumeration representing different types of hairstyles, each associated with a Unicode character.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents the "Bald" hairstyle, associated with the Unicode character 🦲.Represents a curly hairstyle, associated with the Unicode character '🦱'.Represents red hair as a hairstyle, associated with the Unicode character "🦰".Represents red hair as a hairstyle, associated with the Unicode character "🦳". -
Method Summary
Modifier and TypeMethodDescriptionGets the Unicode of the hairstyle.static booleanisHairStyleEmoji(String unicode) Check if the given emoji contains a hairstyle element.static StringremoveHairStyle(String unicode) Removes the hairstyle element from the given emoji.static HairStyleReturns the enum constant of this class with the specified name.static HairStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RED_HAIR
Represents red hair as a hairstyle, associated with the Unicode character "🦰". -
CURLY_HAIR
Represents a curly hairstyle, associated with the Unicode character '🦱'. -
WHITE_HAIR
Represents red hair as a hairstyle, associated with the Unicode character "🦳". -
BALD
Represents the "Bald" hairstyle, associated with the Unicode character 🦲.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getUnicode
Gets the Unicode of the hairstyle.- Returns:
- The Unicode of the hairstyle.
-
isHairStyleEmoji
Check if the given emoji contains a hairstyle element.- Parameters:
unicode- The Unicode of the emoji.- Returns:
- True if the emoji contains a hairstyle element.
-
removeHairStyle
Removes the hairstyle element from the given emoji.- Parameters:
unicode- The Unicode of the emoji.- Returns:
- The Unicode of the emoji without the hairstyle element.
-