public static Affiliation valueOf(int value)
    {
        return switch (value) {
            case 10 -> owner;
            case 20 -> admin;
            case 30 -> member;
            case 40 -> outcast;
            default -> none;
        };
    }
Returns the affiliation associated with the specified value.

@param value the value.
@return the associated affiliation.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/Affiliation.java