
com.github.davidmoten.odata.client.internal.ParameterMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-runtime Show documentation
Show all versions of odata-client-runtime Show documentation
OData client runtime for use with generated code
The newest version!
package com.github.davidmoten.odata.client.internal;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;
public final class ParameterMap {
public static Builder put(String key, String typeWithNamespace, Object value) {
return new Builder().put(key, typeWithNamespace, value);
}
public static Map empty() {
return Collections.emptyMap();
}
public static Map build() {
return new Builder().build();
}
public static final class Builder {
private final Map map = new LinkedHashMap<>();
public Builder put(String key, String typeWithNamespace, Object value) {
map.put(key, new TypedObject(typeWithNamespace, value));
return this;
}
public Map build() {
return map;
}
}
public static Map toMap(Map map) {
Map result = new HashMap<>();
map.forEach((k, v) -> result.put(k, v.object()));
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy