public static < T > Consumer < T > andThen ( final Consumer < T > first , final Consumer < T > second ) { return new Consumer < T > ( ) { @ Override public void accept ( T consumable ) { first . accept ( consumable ) ; second . accept ( consumable ) ; } } ; }
Compose a new consumer from two existing ones . The consumable will be passed to the first then the second .