com.github.longdt.vertxservice.util.ImmutableJsonObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vertx-service4j Show documentation
Show all versions of vertx-service4j Show documentation
A lightweight replacement for vertx-service-proxy. This library is highly optimized for vertx java
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