public class Operators extends Object
A set of useful operators
over collections.
FastCollection.reduce(CollectionOperator)
Modifier and Type | Field and Description |
---|---|
static CollectionOperator<Boolean> |
AND
Conditional 'and' operator (returns
true if the collection is
empty). |
static CollectionOperator<Object> |
ANY
Returns any non-null element.
|
static CollectionOperator<Object> |
MAX
Returns the greatest element of a collection according to the collection
comparator (returns
null if the collection is empty). |
static CollectionOperator<Object> |
MIN
Returns the smallest element of a collection according to the collection
comparator (returns
null if the collection is empty). |
static CollectionOperator<Boolean> |
OR
Conditional 'or' operator (returns
false if the collection is
empty). |
static CollectionOperator<Integer> |
SUM
Returns the sum of the specified integers value (returns
0
if the collection is empty). |
Constructor and Description |
---|
Operators() |
@Parallelizable @Realtime(limit=LINEAR) public static final CollectionOperator<Object> ANY
@Parallelizable(mutexFree=false, comment="Internal use of synchronization") @Realtime(limit=LINEAR) public static final CollectionOperator<Object> MAX
null
if the collection is empty).@Parallelizable(mutexFree=false, comment="Internal use of synchronization") @Realtime(limit=LINEAR) public static final CollectionOperator<Object> MIN
null
if the collection is empty).@Parallelizable @Realtime(limit=LINEAR) public static final CollectionOperator<Boolean> AND
true
if the collection is
empty). This operator stops iterating as soon as a false
value
is found.@Parallelizable @Realtime(limit=LINEAR) public static final CollectionOperator<Boolean> OR
false
if the collection is
empty). This operator stops iterating as soon as a true
value
is found.@Parallelizable(comment="Internal use of AtomicInteger") @Realtime(limit=LINEAR) public static final CollectionOperator<Integer> SUM
0
if the collection is empty).Copyright © 2005-2013 Javolution. All Rights Reserved.