package rocks.matchmaker;

import com.google.common.base.Preconditions;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Util {

    public static <T> List<T> append(List<T> list, T element) {
        ArrayList<T> newList = new ArrayList<>(list);
        newList.add(element);
        return Collections.unmodifiableList(newList);
    }

    public static <T> T checkNotNull(T value) {
        if (value == null) {
            throw new NullPointerException("Value cannot be null");
        }
        return value;
    }

    public static void checkArgument(boolean expression, String message) {
        Preconditions.checkArgument(expression, message);
    }
}

@@ -64,16 +64,60 @@
 ditions;
+%0Aimport com.google.common.reflect.TypeToken;
 %0A%0Aimport
@@ -190,16 +190,48 @@
 il.List;
+%0Aimport java.util.stream.Stream;
 %0A%0Apublic
@@ -630,32 +630,184 @@
 n value;%0A    %7D%0A%0A
+    public static Stream%3CClass%3C?%3E%3E supertypes(Class%3C?%3E type) %7B%0A        return TypeToken.of(type).getTypes().stream().map(TypeToken::getRawType);%0A    %7D%0A%0A
     public stati

Add `Util.supertypes(Class<?>)` method