Javolution 6.0.0 java
javolution.util.function.Splittable< T > Interface Template Reference
Inheritance diagram for javolution.util.function.Splittable< T >:
[legend]

Public Member Functions

void perform (Consumer< T > action, T part)
 
T[] split (int n)
 
void update (Consumer< T > action, T part)
 

Detailed Description

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.

Author
Jean-Marie Dautelle
Version
6.0, July 21, 2013

Definition at line 19 of file Splittable.java.

Member Function Documentation

◆ perform()

void javolution.util.function.Splittable< T >.perform ( Consumer< T >  action,
part 
)

Executes a read-only action on the specified part of this object.

Parameters
actionthe read-only action.
partthis object or a part of it.
Exceptions
UnsupportedOperationExceptionif the action tries to update the specified part.

◆ split()

T [] javolution.util.function.Splittable< T >.split ( int  n)

Returns

n

distinct parts of this object. This method may return an array of size less than

n

(e.g. an array of size one if this object cannot split).

Parameters
nthe number of parts.
Returns
the distinct parts (or views) for this object.
Exceptions
IllegalArgumentExceptionif
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().

Here is the caller graph for this function:

◆ update()

void javolution.util.function.Splittable< T >.update ( Consumer< T >  action,
part 
)

Executes an update action on the specified part of this object. Any change to the part is reflected in the whole (this object).

Parameters
actionthe action authorized to update this object part.
partthis object or a part of it.

The documentation for this interface was generated from the following file: