List of usage examples for org.apache.commons.collections MapUtils getBoolean
public static Boolean getBoolean(final Map map, final Object key)
From source file:com.streamreduce.core.model.Metric.java
@SuppressWarnings("unchecked") public Metric(Map<String, Object> map) { if (map != null) { setId((ObjectId) MapUtils.getObject(map, "_id")); setAccountId(MapUtils.getString(map, "accountId")); setTs(MapUtils.getLong(map, "metricTimestamp")); setValue(MapUtils.getLong(map, "metricValue")); setGranularity(MapUtils.getLong(map, "metricGranularity")); setAgv(MapUtils.getLong(map, "metricAVGY")); setAgv(MapUtils.getLong(map, "metricAVGY")); setStddev(MapUtils.getLong(map, "metricAVGY")); setDiff(MapUtils.getLong(map, "metricAVGY")); setMin(MapUtils.getLong(map, "metricAVGY")); setMax(MapUtils.getLong(map, "metricAVGY")); setAnomaly(MapUtils.getBoolean(map, "metricIsAnomaly")); Map<String, String> criteria = (Map<String, String>) map.get("metricCriteria"); setCriteria(criteria);/*from ww w. java2 s . c o m*/ } }
From source file:com.mirth.connect.model.DatabaseSettings.java
private Boolean getMappedJdbc4() { return MapUtils.getBoolean(databaseJdbc4Map, getDatabase()); }
From source file:org.codice.ddf.registry.schemabindings.helper.MapToSchemaElement.java
public Optional<T> populateBooleanElement(Map<String, Object> map, String mapKey, final Optional<T> referenceElement, BiConsumer<Boolean, T> updater) { Optional<T> elementToPopulate = Optional.empty(); if (referenceElement.isPresent()) { elementToPopulate = Optional.of(referenceElement.get()); }/*from ww w .ja v a 2 s .c om*/ Boolean booleanToPopulate = MapUtils.getBoolean(map, mapKey); if (booleanToPopulate != null) { if (!elementToPopulate.isPresent()) { elementToPopulate = Optional.of(objectFactory.get()); } updater.accept(booleanToPopulate, elementToPopulate.get()); } return elementToPopulate; }