All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.longdt.vertxservice.util.ImmutableJsonObject Maven / Gradle / Ivy

Go to download

A lightweight replacement for vertx-service-proxy. This library is highly optimized for vertx java

There is a newer version: 1.1.1
Show newest version
package com.github.longdt.vertxservice.util;

import io.vertx.core.json.JsonObject;
import io.vertx.core.shareddata.Shareable;

import java.util.Collections;

public class ImmutableJsonObject extends JsonObject {
    private final Shareable object;

    private ImmutableJsonObject(Shareable shareable) {
        super(Collections.emptyMap());
        this.object = shareable;
    }

    public static ImmutableJsonObject of(Shareable shareable) {
        return new ImmutableJsonObject(shareable);
    }

    @SuppressWarnings("unchecked")
    public  T getObject() {
        return (T) object;
    }

    @Override
    public ImmutableJsonObject copy() {
        return new ImmutableJsonObject(object.copy());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy