class FontStyle {
    final public static FontStyle PLAIN = new FontStyle(0);
    final public static FontStyle BOLD = new FontStyle(Font.BOLD);
    final public static FontStyle ITALIC = new FontStyle(Font.ITALIC);
    final public static FontStyle BOLD_ITALIC = new FontStyle(Font.ITALIC | Font.BOLD);

    final public int fontStyle;

    private FontStyle(int fontStyle) {
        this.fontStyle = fontStyle;
    }

    public boolean isItalic() {
        return (fontStyle & Font.ITALIC) != 0;
    }

    public boolean isBold() {
        return (fontStyle & Font.BOLD) != 0;
    }

    public static FontStyle of(int fontStyle) {<FILL_FUNCTION_BODY>}
}

        if ((fontStyle & (Font.BOLD | Font.ITALIC)) == (Font.BOLD | Font.ITALIC)) return BOLD_ITALIC;
        if ((fontStyle & (Font.BOLD)) == (Font.BOLD)) return BOLD;
        if ((fontStyle & (Font.ITALIC)) == (Font.ITALIC)) return ITALIC;
        return PLAIN;
    
<no_super_class>