rebcabin
08/13/2017, 4:11 PMcount()
versus size
for collections? Seems there are two ways to get the number of elements in a collection: count()
called without a predicate argument and size
, looks like a field, attribute, property. Any reason to prefer one over the other?diesieben07
08/13/2017, 4:17 PMcount
is available for Iterable
as well (where it will loop through the Iterable
to count the elements). For Collection
count
and size
are identical.