net.anwiba.spatial.topo.json.v01_0.Properties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anwiba-spatial-data-topo-json Show documentation
Show all versions of anwiba-spatial-data-topo-json Show documentation
anwiba spatial topo json io project
The newest version!
//Copyright (c) 2017 by Andreas W. Bartels
package net.anwiba.spatial.topo.json.v01_0;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class Properties {
private final Map _unknownMembers = new LinkedHashMap<>();
@JsonAnySetter
public void set(final String name, final Object value) {
Objects.requireNonNull(name);
this._unknownMembers.put(name, value);
}
@JsonAnyGetter
public Map get() {
if (this._unknownMembers.isEmpty()) {
return null;
}
return this._unknownMembers;
}
@JsonIgnore
public Iterable getNames() {
return this._unknownMembers.keySet();
}
public Object getValue(final String name) {
if (name == null) {
return null;
}
return this._unknownMembers.get(name);
}
}