Javolution 6.0.0 java
|
Public Member Functions | |
void | perform (Consumer< T > action, T part) |
T[] | split (int n) |
void | update (Consumer< T > action, T part) |
An object which can be divided in distinct parts and on which the same action may be performed on its part rather than its whole.
Definition at line 19 of file Splittable.java.
void javolution.util.function.Splittable< T >.perform | ( | Consumer< T > | action, |
T | part | ||
) |
Executes a read-only action on the specified part of this object.
action | the read-only action. |
part | this object or a part of it. |
UnsupportedOperationException | if the action tries to update the specified part. |
T [] javolution.util.function.Splittable< T >.split | ( | int | n | ) |
Returns
distinct parts of this object. This method may return an array of size less than
(e.g. an array of size one if this object cannot split).
n | the number of parts. |
IllegalArgumentException | if n <= 1
|
Implemented in javolution.util.internal.map.MapView< K, V >, javolution.util.internal.table.SharedTableImpl< E >, javolution.util.internal.table.TableView< E >, javolution.util.internal.collection.SharedCollectionImpl< E >, javolution.util.internal.collection.CollectionView< E >, javolution.util.internal.table.AtomicTableImpl< E >, javolution.util.internal.map.SharedMapImpl< K, V >, javolution.util.internal.map.FastMapImpl< K, V >, javolution.util.internal.map.AtomicMapImpl< K, V >, javolution.util.internal.collection.AtomicCollectionImpl< E >, and javolution.util.internal.map.MapView< K, V >.EntrySet.
Referenced by javolution.util.internal.map.ParallelMapImpl< K, V >.perform(), and javolution.util.internal.collection.ParallelCollectionImpl< E >.perform().
void javolution.util.function.Splittable< T >.update | ( | Consumer< T > | action, |
T | part | ||
) |
Executes an update action on the specified part of this object. Any change to the part is reflected in the whole (this object).
action | the action authorized to update this object part. |
part | this object or a part of it. |