Java Code Examples for scala.collection.Map#get()
The following examples show how to use
scala.collection.Map#get() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SingerStatus.java From singer with Apache License 2.0 | 5 votes |
private Double getGaugeValue(Map<String, Object> gauges, String gaugeName) { Double result = 0.0; if (gauges.contains(gaugeName)) { @SuppressWarnings("rawtypes") Option option = gauges.get(gaugeName); result = option.isDefined() ? (Double) option.get() : 0.0; } return result; }
Example 2
Source File: SingerStatus.java From singer with Apache License 2.0 | 5 votes |
private Long getCounterValue(Map<String, Object> counters, String counterName) { Long result = 0L; if (counters.contains(counterName)) { @SuppressWarnings("rawtypes") Option option = counters.get(counterName); result = option.isDefined() ? (Long) option.get() : 0L; } return result; }