Examples of asObject()


Examples of com.creativewidgetworks.goldparser.parser.Variable.asObject()

        try {
            // Retrieve the function Reduction, set parameters, and execute the function
            Variable var = theParser.getProgramVariable(Function.FUNCTION_PREFIX + functionName);
            if (var != null) {
                Function fn = (Function)var.asObject();

                List<String> parameters = fn.getParameters();

                // Make sure we have the proper number of calling parameters
                if (parameters.size() != arguments.size()) {
View Full Code Here

Examples of com.creativewidgetworks.goldparser.parser.Variable.asObject()

            Variable var = parser.getProgramVariable(KEY_PARAMETERS);
            if (var == null) {
                stack = new Stack();
                parser.setProgramVariable(KEY_PARAMETERS, new Variable(stack));
            } else {
                stack = (Stack)var.asObject();
            }

            stack.push(reduction.get(0).getData());

            // Copy the values of the current stack to the value object leaving
View Full Code Here

Examples of com.eclipsesource.json.JsonValue.asObject()

        MAX_REMOVE_LATENCY_UPDATER.set(this, getLong(json, "maxRemoveLatency", -1L));
        heapCost = getLong(json, "heapCost", -1L);
        final JsonValue jsonNearCacheStats = json.get("nearCacheStats");
        if (jsonNearCacheStats != null) {
            nearCacheStats = new NearCacheStatsImpl();
            nearCacheStats.fromJson(jsonNearCacheStats.asObject());
        }
    }

    @Override
    public String toString() {
View Full Code Here

Examples of com.eclipsesource.json.JsonValue.asObject()

    }

    public static JsonObject getObject(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asObject();
    }

    public static JsonObject getObject(JsonObject object, String field, JsonObject defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
View Full Code Here

Examples of com.eclipsesource.json.JsonValue.asObject()

    public static JsonObject getObject(JsonObject object, String field, JsonObject defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
            return defaultValue;
        } else {
            return value.asObject();
        }
    }

    private static void throwExceptionIfNull(JsonValue value, String field) {
        if (value == null) {
View Full Code Here

Examples of com.github.jsonj.JsonElement.asObject()

            }
            JsonElement value = entry.getValue();
            if(value.isArray()) {
                append(child, value.asArray());
            } else if(value.isObject()) {
                append(child, value.asObject());
            } else {
                append(child, value.asPrimitive());
            }

            e.appendChild(child);
View Full Code Here

Examples of com.github.jsonj.JsonElement.asObject()

        JsonElement e = stack.peekLast();
        if (e.isPrimitive()) {
            e = stack.pollLast();
            JsonElement last = stack.peekLast();
            if (last.isObject()) {
                JsonObject container = last.asObject();
                String key = e.asPrimitive().asString();
                container.put(key, value);
            } else if (last.isArray()) {
                throw new IllegalStateException("shouldn't happen");
View Full Code Here

Examples of com.hazelcast.com.eclipsesource.json.JsonValue.asObject()

    }

    public static JsonObject getObject(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asObject();
    }

    public static JsonObject getObject(JsonObject object, String field, JsonObject defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
View Full Code Here

Examples of com.hazelcast.com.eclipsesource.json.JsonValue.asObject()

    public static JsonObject getObject(JsonObject object, String field, JsonObject defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
            return defaultValue;
        } else {
            return value.asObject();
        }
    }

    private static void throwExceptionIfNull(JsonValue value, String field) {
        if (value == null) {
View Full Code Here

Examples of com.hazelcast.com.eclipsesource.json.JsonValue.asObject()

        MAX_REMOVE_LATENCY_UPDATER.set(this, getLong(json, "maxRemoveLatency", -1L));
        heapCost = getLong(json, "heapCost", -1L);
        final JsonValue jsonNearCacheStats = json.get("nearCacheStats");
        if (jsonNearCacheStats != null) {
            nearCacheStats = new NearCacheStatsImpl();
            nearCacheStats.fromJson(jsonNearCacheStats.asObject());
        }
    }

    @Override
    public String toString() {
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.