Verified Commit 9568226e authored by Johannes Visintini's avatar Johannes Visintini
Browse files

use EnumMap instead of HashMap for ContributionTypes

parent 042bf61a
Pipeline #2511 passed with stage
in 0 seconds
package org.heigit.ohsome.oshdb.tutorial;
import java.util.Arrays;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Map;
import java.util.SortedMap;
import org.heigit.ohsome.oshdb.OSHDBTimestamp;
......@@ -62,7 +62,7 @@ public class AdvandcedExample {
@Override
public Map<ContributionType, Integer> get() {
//create an empty result-map
Map<ContributionType, Integer> result = new HashMap<>();
Map<ContributionType, Integer> result = new EnumMap<>(ContributionType.class);
//fill with 0 values
Arrays.asList(ContributionType.values())
.forEach(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment