com.vdurmont.emoji.Fitzpatrick Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of emoji-java Show documentation
Show all versions of emoji-java Show documentation
The missing emoji library for Java.
package com.vdurmont.emoji;
/**
* Enum that represents the Fitzpatrick modifiers supported by the emojis.
*/
public enum Fitzpatrick {
/**
* Fitzpatrick modifier of type 1/2 (pale white/white)
*/
TYPE_1_2("\uD83C\uDFFB"),
/**
* Fitzpatrick modifier of type 3 (cream white)
*/
TYPE_3("\uD83C\uDFFC"),
/**
* Fitzpatrick modifier of type 4 (moderate brown)
*/
TYPE_4("\uD83C\uDFFD"),
/**
* Fitzpatrick modifier of type 5 (dark brown)
*/
TYPE_5("\uD83C\uDFFE"),
/**
* Fitzpatrick modifier of type 6 (black)
*/
TYPE_6("\uD83C\uDFFF");
/**
* The unicode representation of the Fitzpatrick modifier
*/
public final String unicode;
Fitzpatrick(String unicode) {
this.unicode = unicode;
}
public static Fitzpatrick fitzpatrickFromUnicode(String unicode) {
for (Fitzpatrick v : values()) {
if (v.unicode.equals(unicode)) {
return v;
}
}
return null;
}
public static Fitzpatrick fitzpatrickFromType(String type) {
try {
return Fitzpatrick.valueOf(type.toUpperCase());
} catch (IllegalArgumentException e) {
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy