Map, filter, reduce in java.