org.kurento.client.Properties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kurento-client Show documentation
Show all versions of kurento-client Show documentation
Kurento Client
The Kurento Client project allows server applications to control media server resources.
package org.kurento.client;
import java.util.HashMap;
import java.util.Map;
public class Properties {
private Map values = new HashMap<>();
public static Properties of(Object... params) {
if (params.length % 2 != 0) {
throw new IllegalArgumentException(
"Each key should have a value (pair number of parameters). Parameters are: " + params);
}
Properties props = new Properties();
for (int i = 0; i < params.length; i += 2) {
if (!(params[i] instanceof String)) {
throw new IllegalArgumentException(
"Property key should be an String value. Parameter " + i + " is " + params[i]);
}
props.add((String) params[i], params[i + 1]);
}
return props;
}
public Properties add(String property, Object value) {
values.put(property, value);
return this;
}
public Object get(String property) {
return values.get(property);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy