aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs187/470633
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2015-06-25 13:20:02 -0700
committerAndy Clement <aclement@pivotal.io>2015-06-25 13:20:02 -0700
commit451a29f0fd2e55e7e2c1e54a6ae9d01a42b7b128 (patch)
tree69e901acc4be576af1eb2f7a5253b54c1eaec7f7 /tests/bugs187/470633
parent6b93a91e234dcf4286b168421fd88484d1c855ad (diff)
downloadaspectj-451a29f0fd2e55e7e2c1e54a6ae9d01a42b7b128.tar.gz
aspectj-451a29f0fd2e55e7e2c1e54a6ae9d01a42b7b128.zip
AspectJ upgraded to Mars compiler
Diffstat (limited to 'tests/bugs187/470633')
-rw-r--r--tests/bugs187/470633/Maps.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/bugs187/470633/Maps.java b/tests/bugs187/470633/Maps.java
new file mode 100644
index 000000000..a46ffd2c9
--- /dev/null
+++ b/tests/bugs187/470633/Maps.java
@@ -0,0 +1,22 @@
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @author Jun Dong (edong@elementum.com)
+ * Created at: 6/18/15 9:50 AM
+ * @since 1.0
+ * Description:
+ */
+public class Maps {
+
+ public static <K, V> Map<K, V> toMap(Map.Entry<K, V>... entries) {
+ return Collections.unmodifiableMap(
+ Stream
+ .of(entries)
+ .collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue())));
+ }
+
+}