package com.wizzardo.tools.misc;

/**
 * Created by wizzardo on 05.12.15.
 */
public class With {

    public static <T> T with(T t, Consumer<T> consumer) {
        consumer.consume(t);
        return t;
    }

    public static <A, B> B map(A a, Mapper<? super A, B> mapper) {
        return mapper.map(a);
    }
}

@@ -306,11 +306,81 @@
 );%0A    %7D
+%0A%0A    public static %3CT%3E T cast(Object o) %7B%0A        return (T) o;%0A    %7D
 %0A%7D%0A

add cast