public static < T > void consumeByBoolean ( boolean bool , T target , Consumer < T > trueConsumer , Consumer < T > falseConsumer ) { if ( bool ) trueConsumer . accept ( target ) ; else falseConsumer . accept ( target ) ; }
Consume by boolean .