clustering/common/src/main/java/org/jboss/as/clustering/dmr/ModelNodes.java
public static <E extends Enum<E>> Optional<E> optionalEnum(ModelNode value, Class<E> targetClass) {
        return value.isDefined() ? Optional.of(asEnum(value, targetClass)) : Optional.empty();
    }
public static <E extends Enum<E>> Optional<E> optionalEnum(ModelNode value, Class<E> targetClass) {
        return value.isDefined() ? Optional.of(asEnum(value, targetClass)) : Optional.empty();
    }
public static < E extends Enum < E > > Optional < E > optionalEnum ( ModelNode value , Class < E > targetClass ) { return value . isDefined ( ) ? Optional . of ( asEnum ( value , targetClass ) ) : Optional . empty ( ) ; }
Returns the optional enum value of the specified {@link ModelNode}.
@param value the model node
@return an optional value
Returns the optional enum value of the specified {