public static Role valueOf(int value)
    {
        return switch (value) {
            case 0 -> moderator;
            case 1 -> participant;
            case 2 -> visitor;
            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/Role.java