Skip to content

Instantly share code, notes, and snippets.

Matti mojo2012

Block or report user

Report or block mojo2012

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:da4e8193d25b1cb92bf416493022a09d
MiscUtils.java:
public static <T, C extends T> void with(T object, Class<C> asCastType, Consumer<C> consumer) {
consumer.accept((C) object);
}
I can be used like this:
BaseOpeningDay dayToBeSet = new OpeningDay();
You can’t perform that action at this time.