From 4f8c4b581f16551a364e203fd8142f7717101a2f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jan 2016 14:42:50 +0000 Subject: Add list as shorter alias of ImmutableList.of --- .../java/org/zwobble/mammoth/util/MammothLists.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/java/org/zwobble/mammoth/util/MammothLists.java (limited to 'src/main/java/org/zwobble/mammoth/util') 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 List list() { + return ImmutableList.of(); + } + + public static List list(T value1) { + return ImmutableList.of(value1); + } + + public static List list(T value1, T value2) { + return ImmutableList.of(value1, value2); + } +} -- cgit v1.2.3