aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/util
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-03 14:42:50 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-03 14:42:50 +0000
commit4f8c4b581f16551a364e203fd8142f7717101a2f (patch)
tree077bb2fd98d675a039478980b90ffe77616de42f /src/main/java/org/zwobble/mammoth/util
parent6e97bf5bb28ad5a63f396873399a457be6fe779d (diff)
Add list as shorter alias of ImmutableList.of
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/util')
-rw-r--r--src/main/java/org/zwobble/mammoth/util/MammothLists.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/org/zwobble/mammoth/util/MammothLists.java b/src/main/java/org/zwobble/mammoth/util/MammothLists.java
new file mode 100644
index 0000000..e038ec7
--- /dev/null
+++ b/src/main/java/org/zwobble/mammoth/util/MammothLists.java
@@ -0,0 +1,19 @@
+package org.zwobble.mammoth.util;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+
+public class MammothLists {
+ public static <T> List<T> list() {
+ return ImmutableList.of();
+ }
+
+ public static <T> List<T> list(T value1) {
+ return ImmutableList.of(value1);
+ }
+
+ public static <T> List<T> list(T value1, T value2) {
+ return ImmutableList.of(value1, value2);
+ }
+}