io.vertx.ext.consul.CoordinateConverter Maven / Gradle / Ivy
package io.vertx.ext.consul;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
/**
* Converter and mapper for {@link io.vertx.ext.consul.Coordinate}.
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.consul.Coordinate} original class using Vert.x codegen.
*/
public class CoordinateConverter {
static void fromJson(Iterable> json, Coordinate obj) {
for (java.util.Map.Entry member : json) {
switch (member.getKey()) {
case "node":
if (member.getValue() instanceof String) {
obj.setNode((String)member.getValue());
}
break;
case "adj":
if (member.getValue() instanceof Number) {
obj.setAdj(((Number)member.getValue()).floatValue());
}
break;
case "err":
if (member.getValue() instanceof Number) {
obj.setErr(((Number)member.getValue()).floatValue());
}
break;
case "height":
if (member.getValue() instanceof Number) {
obj.setHeight(((Number)member.getValue()).floatValue());
}
break;
case "vec":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList list = new java.util.ArrayList<>();
((Iterable
© 2015 - 2025 Weber Informatics LLC | Privacy Policy