mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

James Phillpotts
18.18.2015 15a45dc0f24e3d7c50fb597e96db9b4602a81fa1
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PersistentSearchChangeType.java
@@ -84,4 +84,20 @@
    public int intValue() {
        return intValue;
    }
    /**
     * Returns the enum value that would return the provided argument value from its {@link #intValue} method.
     *
     * @param value The value to match.
     * @return The appropriate enum value.
     */
    public static PersistentSearchChangeType valueOf(int value) {
        switch (value) {
            case 1: return ADD;
            case 2: return DELETE;
            case 4: return MODIFY;
            case 8: return MODIFY_DN;
            default: throw new IllegalArgumentException("Unknown int value: " + value);
        }
    }
}