aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/util/MammothMaps.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-24 08:16:16 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-24 08:16:16 +0000
commit3e2786a004eddf968a5fa7d5a92dff5b1b5f7734 (patch)
tree7fa1bcc1e484cd0ef782f64baf504ee83333d397 /src/main/java/org/zwobble/mammoth/util/MammothMaps.java
parent0dc3a12affc2e46c1a0df2899cf51a1ae3fdbd61 (diff)
Create internal package
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/util/MammothMaps.java')
-rw-r--r--src/main/java/org/zwobble/mammoth/util/MammothMaps.java32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/main/java/org/zwobble/mammoth/util/MammothMaps.java b/src/main/java/org/zwobble/mammoth/util/MammothMaps.java
deleted file mode 100644
index 782bd91..0000000
--- a/src/main/java/org/zwobble/mammoth/util/MammothMaps.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.zwobble.mammoth.util;
-
-import com.google.common.collect.ImmutableMap;
-
-import java.util.Map;
-import java.util.function.Function;
-
-public class MammothMaps {
- public static <K, V> Map<K, V> map() {
- return ImmutableMap.of();
- }
-
- public static <K, V> Map<K, V> map(K key1, V value1) {
- return ImmutableMap.of(key1, value1);
- }
-
- public static <K, V> Map<K, V> map(K key1, V value1, K key2, V value2) {
- return ImmutableMap.of(key1, value1, key2, value2);
- }
-
- public static <K, V> Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3) {
- return ImmutableMap.of(key1, value1, key2, value2, key3, value3);
- }
-
- public static <T, K, V> Map<K, V> toMap(Iterable<T> iterable, Function<T, Map.Entry<K, V>> function) {
- ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
- for (T element : iterable) {
- builder.put(function.apply(element));
- }
- return builder.build();
- }
-}