Package org.jboss.dmr

Examples of org.jboss.dmr.ModelNode.asDouble()


        @Override
        protected ModelNode correctValue(ModelNode toResolve, boolean isWriteAttribute) {
            ModelNode result = super.correctValue(toResolve, isWriteAttribute);
            if (result.equals(toResolve)
                    && (result.getType() == ModelType.DOUBLE || result.getType() == ModelType.STRING)) {
                result = new ModelNode((int) Math.round(result.asDouble()));
            }
            return result;
        }
    }
View Full Code Here


                            break;
                        case BYTES:
                            toSet.set(modelValue.asBytes());
                            break;
                        case DOUBLE:
                            toSet.set(modelValue.asDouble());
                            break;
                        case INT:
                            toSet.set(modelValue.asInt());
                            break;
                        case LONG:
View Full Code Here

                            break;
                        case BYTES:
                            toSet.set(modelValue.asBytes());
                            break;
                        case DOUBLE:
                            toSet.set(modelValue.asDouble());
                            break;
                        case INT:
                            toSet.set(modelValue.asInt());
                            break;
                        case LONG:
View Full Code Here

                break;
      case BOOLEAN:    properties.put(key, value.asBoolean(false));
                break;
      case BYTES:      properties.put(key, value.asBytes());
                break;
      case DOUBLE:    properties.put(key, value.asDouble(0));
                break;
      case INT:      properties.put(key, value.asInt(0));
                break;
      case LIST:      List<ModelNode> l = value.asList();
                if (!l.isEmpty()) {
View Full Code Here

                            break;
                        case BYTES:
                            toSet.set(modelValue.asBytes());
                            break;
                        case DOUBLE:
                            toSet.set(modelValue.asDouble());
                            break;
                        case INT:
                            toSet.set(modelValue.asInt());
                            break;
                        case LONG:
View Full Code Here

            case BOOLEAN:
                return node.asBoolean();
            case BYTES:
                return node.asBytes();
            case DOUBLE:
                return defaultValue != null ? node.asDouble(defaultValue.asDouble()) : node.asDouble();
            case EXPRESSION:
                return node.resolve().asString();
            case INT:
                return defaultValue != null ? node.asInt(defaultValue.asInt()) : node.asInt();
            case LIST:
View Full Code Here

                        break;
                    case BYTES:
                        node.set(node.asBytes());
                        break;
                    case DOUBLE:
                        node.set(node.asDouble());
                        break;
                    case INT:
                        node.set(node.asInt());
                        break;
                    case LONG:
View Full Code Here

                        break;
                    case BYTES:
                        node.set(node.asBytes());
                        break;
                    case DOUBLE:
                        node.set(node.asDouble());
                        break;
                    case INT:
                        node.set(node.asInt());
                        break;
                    case LONG:
View Full Code Here

                        break;
                    case BYTES:
                        node.set(node.asBytes());
                        break;
                    case DOUBLE:
                        node.set(node.asDouble());
                        break;
                    case INT:
                        node.set(node.asInt());
                        break;
                    case LONG:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.