Skip to content

Polar Vortex

Compare
Choose a tag to compare
@ipavlic ipavlic released this 01 Feb 13:23

Experimental reduceType methods were removed in favour of mapToType style of methods, which return TypeCollection. This is similar to Java's Stream. For example,

Decimal totalAmount = Collection.of(opps).mapToDecimal(Opportunity.Amount).sum();

Current API is also unstable, and will possibly change to make the naming more consistent or to remove redundancies.

Previous naming favoured plural endings (groupByStrings, pluckDoubles), while new type collections use Java's singular convention.

One example of redundancy is Collection.of(opps).pluckDecimals(Opportunity.Amount) which yields the same result as Collection.of(opps).mapToDecimal(Opportunity.Amount).asList().