Javolution 6.0.0 java
|
Public Member Functions | |
SharedTableImpl (TableService< E > target) | |
void | add (int index, E element) |
boolean | addAll (int index, Collection<? extends E > c) |
void | addFirst (E element) |
void | addLast (E element) |
Iterator< E > | descendingIterator () |
E | element () |
E | get (int index) |
E | getFirst () |
E | getLast () |
int | indexOf (Object element) |
ListIterator< E > | iterator () |
int | lastIndexOf (Object element) |
ListIterator< E > | listIterator () |
ListIterator< E > | listIterator (int index) |
boolean | offer (E e) |
boolean | offerFirst (E e) |
boolean | offerLast (E e) |
E | peek () |
E | peekFirst () |
E | peekLast () |
E | poll () |
E | pollFirst () |
E | pollLast () |
E | pop () |
void | push (E e) |
E | remove () |
E | remove (int index) |
E | removeFirst () |
boolean | removeFirstOccurrence (Object o) |
E | removeLast () |
boolean | removeLastOccurrence (Object o) |
E | set (int index, E element) |
CollectionService< E >[] | split (int n) |
TableService< E > | subList (int fromIndex, int toIndex) |
TableService< E > | threadSafe () |
boolean | add (E element) |
boolean | addAll (Collection<? extends E > c) |
FastCollection< E > | addAll (E... elements) |
FastCollection< E > | addAll (FastCollection<? extends E > that) |
void | clear () |
SharedCollectionImpl< E > | clone () |
Equality<? super E > | comparator () |
boolean | contains (Object o) |
boolean | containsAll (Collection<?> c) |
boolean | equals (Object o) |
int | hashCode () |
boolean | isEmpty () |
void | perform (Consumer< CollectionService< E >> action, CollectionService< E > view) |
void | perform (Consumer<? extends Collection< E >> action) |
void | perform (Consumer< T > action, T part) |
boolean | remove (Object o) |
boolean | removeAll (Collection<?> c) |
boolean | retainAll (Collection<?> c) |
int | size () |
Object[] | toArray () |
void | update (Consumer< CollectionService< E >> action, CollectionService< E > view) |
void | update (Consumer<? extends Collection< E >> action) |
void | update (Consumer< T > action, T part) |
FastCollection< E > | atomic () |
FastCollection< E > | shared () |
FastCollection< E > | parallel () |
FastCollection< E > | sequential () |
FastCollection< E > | unmodifiable () |
FastCollection< E > | filtered (Predicate<? super E > filter) |
FastCollection< E > | sorted () |
FastCollection< E > | sorted (Comparator<? super E > cmp) |
FastCollection< E > | reversed () |
FastCollection< E > | distinct () |
void | forEach (final Consumer<? super E > consumer) |
boolean | removeIf (final Predicate<? super E > filter) |
E | reduce (Reducer< E > reducer) |
E | min () |
E | max () |
String | toString () |
Protected Member Functions | |
TableService< E > | target () |
CollectionService< E > | cloneTarget () |
CollectionService< E > | service () |
Static Protected Member Functions | |
static< E > CollectionService< E > | serviceOf (FastCollection< E > collection) |
Protected Attributes | |
ReadWriteLockImpl | lock |
Package Functions | |
public< T > T[] | toArray (T[] a) |
public< R > FastCollection< R > | mapped (Function<? super E, ? extends R > function) |
public< T extends E > T | any (Class< T > type) |
public< T extends Collection< E > > Immutable< T > | toImmutable () |
Static Private Attributes | |
static final long | serialVersionUID = 0x600L |
A shared view over a table allowing concurrent access and sequential updates.
Definition at line 22 of file SharedTableImpl.java.
javolution.util.internal.table.SharedTableImpl< E >.SharedTableImpl | ( | TableService< E > | target | ) |
Definition at line 27 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.target().
|
inherited |
Adds the specified element to this collection
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 70 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.collection.CollectionView< E >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
void javolution.util.internal.table.SharedTableImpl< E >.add | ( | int | index, |
E | element | ||
) |
Definition at line 32 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.element(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Adds all the specified elements to this collection.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 80 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.collection.CollectionView< E >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Returns this collection with the specified element added.
elements | the elements to be added. |
Reimplemented in javolution.util.FastTable< E >, javolution.util.FastSortedSet< E >, javolution.util.FastSet< E >, and javolution.util.FastSortedTable< E >.
Definition at line 552 of file FastCollection.java.
|
inherited |
Returns this collection with the specified collection's elements added in sequence.
Reimplemented in javolution.util.FastTable< E >, javolution.util.FastSortedSet< E >, javolution.util.FastSet< E >, and javolution.util.FastSortedTable< E >.
Definition at line 564 of file FastCollection.java.
boolean javolution.util.internal.table.SharedTableImpl< E >.addAll | ( | int | index, |
Collection<? extends E > | c | ||
) |
Definition at line 42 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
void javolution.util.internal.table.SharedTableImpl< E >.addFirst | ( | E | element | ) |
Definition at line 52 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.element(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
Referenced by javolution.util.internal.table.SharedTableImpl< E >.push().
void javolution.util.internal.table.SharedTableImpl< E >.addLast | ( | E | element | ) |
Definition at line 62 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.element(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
packageinherited |
Returns any non-null element of the specified type (convenience method).
type | the element type searched for. |
Definition at line 515 of file FastCollection.java.
References javolution.util.function.Reducers.any().
|
inherited |
Returns an atomic view over this collection. All operations that write or access multiple elements in the collection (such as addAll(), retainAll()) are atomic. Iterators on atomic collections are thread-safe (no ConcurrentModificationException possible).
Reimplemented in javolution.util.FastTable< E >, javolution.util.FastSet< E >, javolution.util.FastSortedTable< E >, and javolution.util.FastSortedSet< E >.
Definition at line 187 of file FastCollection.java.
|
inherited |
Removes all elements from this collection.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 90 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.collection.CollectionView< E >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Returns a copy of this collection; updates of the copy should not impact the original.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 100 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
protectedinherited |
Returns a clone copy of target.
Definition at line 266 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.CollectionView< E >.target.
Referenced by javolution.util.internal.collection.SharedCollectionImpl< E >.IteratorImpl.IteratorImpl().
|
inherited |
Returns the comparator uses by this collection for equality and/or ordering if this collection is sorted.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 113 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.CollectionView< E >.target.
|
inherited |
Indicates if this collection contains the specified element.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 118 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Indicates if this collection contains all the specified elements.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 128 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
Iterator<E> javolution.util.internal.table.SharedTableImpl< E >.descendingIterator | ( | ) |
Definition at line 72 of file SharedTableImpl.java.
References javolution.util.internal.table.TableView< E >.iterator().
|
inherited |
Returns a view exposing only distinct elements (it does not iterate twice over the same elements). Adding elements already in the collection through this view has no effect. If this collection is initially empty, using a distinct view to add new elements ensures that this collection has no duplicate.
Definition at line 293 of file FastCollection.java.
E javolution.util.internal.table.SharedTableImpl< E >.element | ( | ) |
Definition at line 77 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.getFirst().
Referenced by javolution.util.internal.table.SharedTableImpl< E >.add(), javolution.util.internal.table.SharedTableImpl< E >.addFirst(), javolution.util.internal.table.sorted.SharedSortedTableImpl< E >.addIfAbsent(), javolution.util.internal.table.SharedTableImpl< E >.addLast(), javolution.util.internal.table.SharedTableImpl< E >.indexOf(), javolution.util.internal.table.SharedTableImpl< E >.lastIndexOf(), javolution.util.internal.table.sorted.SharedSortedTableImpl< E >.positionOf(), and javolution.util.internal.table.SharedTableImpl< E >.set().
|
inherited |
Compares the specified object with this collection for equality. This method follows the Collection#equals(Object) specification if this collection comparator is Equalities#STANDARD (default). Otherwise, only collections using the same comparator can be considered equals.
obj | the object to be compared for equality with this collection |
true
if both collections are considered equals; false
otherwise. Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 138 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Returns a view exposing only the elements matching the specified filter. Adding elements not matching the specified filter has no effect. If this collection is initially empty, using a filtered view to add new elements ensure that this collection has only elements satisfying the filter predicate.
Reimplemented in javolution.util.FastSet< E >.
Definition at line 250 of file FastCollection.java.
|
inherited |
Iterates over all this collection elements applying the specified consumer (convenience method). Iterations are performed concurrently if the collection is parallel.
consumer | the functional consumer applied to the collection elements. |
Definition at line 346 of file FastCollection.java.
References javolution.util.function.Consumer< T >.accept().
E javolution.util.internal.table.SharedTableImpl< E >.get | ( | int | index | ) |
Definition at line 82 of file SharedTableImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
E javolution.util.internal.table.SharedTableImpl< E >.getFirst | ( | ) |
Definition at line 92 of file SharedTableImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
Referenced by javolution.util.internal.table.SharedTableImpl< E >.element().
E javolution.util.internal.table.SharedTableImpl< E >.getLast | ( | ) |
Definition at line 102 of file SharedTableImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Returns the hash code of this collection. This method follows the Collection#hashCode() specification if this collection comparator is Equalities#STANDARD.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 148 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
int javolution.util.internal.table.SharedTableImpl< E >.indexOf | ( | Object | element | ) |
Definition at line 112 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.element(), javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Indicates if this collection is empty.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 158 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
ListIterator<E> javolution.util.internal.table.SharedTableImpl< E >.iterator | ( | ) |
Returns an iterator over this collection elements. For shared/atomic collections the iterator is immune to concurrent modifications. In other words the elements iterated over may or may not reflect the current state of the collection.
Reimplemented from javolution.util.internal.collection.SharedCollectionImpl< E >.
Definition at line 122 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.target().
int javolution.util.internal.table.SharedTableImpl< E >.lastIndexOf | ( | Object | element | ) |
Definition at line 127 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.element(), javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
ListIterator<E> javolution.util.internal.table.SharedTableImpl< E >.listIterator | ( | ) |
Definition at line 137 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.target().
ListIterator<E> javolution.util.internal.table.SharedTableImpl< E >.listIterator | ( | int | index | ) |
Definition at line 142 of file SharedTableImpl.java.
|
packageinherited |
Returns a view exposing elements through the specified mapping function. The returned view does not allow new elements to be added.
Definition at line 258 of file FastCollection.java.
Referenced by javolution.xml.internal.stream.EntitiesImpl.setEntitiesMapping().
|
inherited |
Returns the largest element of this collection using this collection comparator (convenience method). Returns
if this collection is empty.
Definition at line 541 of file FastCollection.java.
References javolution.util.function.Reducers.max().
|
inherited |
Returns the smallest element of this collection using this collection comparator (convenience method). Returns
if this collection is empty.
Definition at line 528 of file FastCollection.java.
References javolution.util.function.Reducers.min().
boolean javolution.util.internal.table.SharedTableImpl< E >.offer | ( | E | e | ) |
Definition at line 147 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.offerLast().
boolean javolution.util.internal.table.SharedTableImpl< E >.offerFirst | ( | E | e | ) |
Definition at line 152 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
boolean javolution.util.internal.table.SharedTableImpl< E >.offerLast | ( | E | e | ) |
Definition at line 162 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
Referenced by javolution.util.internal.table.SharedTableImpl< E >.offer().
|
inherited |
Returns a parallel collection. Parallel collections affect only closure-based operations, all others operations behaving the same. Parallel actions are performed concurrently using Javolution ConcurrentContext. The number of parallel views is derived from the context concurrency (
). Parallel views do not require this collection to be thread-safe (internal synchronization).
Definition at line 222 of file FastCollection.java.
E javolution.util.internal.table.SharedTableImpl< E >.peek | ( | ) |
Definition at line 172 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.peekFirst().
E javolution.util.internal.table.SharedTableImpl< E >.peekFirst | ( | ) |
Definition at line 177 of file SharedTableImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
Referenced by javolution.util.internal.table.SharedTableImpl< E >.peek().
E javolution.util.internal.table.SharedTableImpl< E >.peekLast | ( | ) |
Definition at line 187 of file SharedTableImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.table.SharedTableImpl< E >.target(), and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 173 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
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. |
|
inherited |
Executes the specified read-only action on this collection. That logic may be performed concurrently on sub-collections if this collection is parallel.
action | the read-only action. |
UnsupportedOperationException | if the action tries to update this collection and this collection is thread-safe. |
ClassCastException | if the action type is not compatible with this collection (e.g. action on set and this is a list). |
Definition at line 315 of file FastCollection.java.
E javolution.util.internal.table.SharedTableImpl< E >.poll | ( | ) |
Definition at line 197 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.pollFirst().
E javolution.util.internal.table.SharedTableImpl< E >.pollFirst | ( | ) |
Definition at line 202 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
Referenced by javolution.util.internal.table.SharedTableImpl< E >.poll().
E javolution.util.internal.table.SharedTableImpl< E >.pollLast | ( | ) |
Definition at line 212 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
E javolution.util.internal.table.SharedTableImpl< E >.pop | ( | ) |
Definition at line 222 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.removeFirst().
void javolution.util.internal.table.SharedTableImpl< E >.push | ( | E | e | ) |
Definition at line 227 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.addFirst().
|
inherited |
Performs a reduction of the elements of this collection using the specified reducer. This may not involve iterating over all the collection elements, for example the reducers: Reducers#any, Reducers#and and Reducers#or may stop iterating early. Reduction is performed concurrently if this collection is parallel.
reducer | the collection reducer. |
Definition at line 396 of file FastCollection.java.
E javolution.util.internal.table.SharedTableImpl< E >.remove | ( | ) |
Definition at line 232 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.removeFirst().
E javolution.util.internal.table.SharedTableImpl< E >.remove | ( | int | index | ) |
Definition at line 237 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Removes the specified element from this collection.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 184 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.collection.CollectionView< E >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
Referenced by javolution.util.internal.collection.SharedCollectionImpl< E >.IteratorImpl.remove().
|
inherited |
Removes all the specified element from this collection.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 194 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.collection.CollectionView< E >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
E javolution.util.internal.table.SharedTableImpl< E >.removeFirst | ( | ) |
Definition at line 247 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
Referenced by javolution.util.internal.table.SharedTableImpl< E >.pop(), and javolution.util.internal.table.SharedTableImpl< E >.remove().
boolean javolution.util.internal.table.SharedTableImpl< E >.removeFirstOccurrence | ( | Object | o | ) |
Definition at line 257 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Removes from this collection all the elements matching the specified functional predicate (convenience method). Removals are performed concurrently if this collection is parallel and atomically if this collection is atomic.
filter | a predicate returning true
|
Definition at line 368 of file FastCollection.java.
E javolution.util.internal.table.SharedTableImpl< E >.removeLast | ( | ) |
Definition at line 267 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
boolean javolution.util.internal.table.SharedTableImpl< E >.removeLastOccurrence | ( | Object | o | ) |
Definition at line 277 of file SharedTableImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Removes all the elements except those in the specified collection.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 204 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.collection.CollectionView< E >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Returns a view exposing elements in reverse iterative order.
Reimplemented in javolution.util.FastTable< E >.
Definition at line 282 of file FastCollection.java.
|
inherited |
Returns a sequential view of this collection. Using this view, all closure-based iterations are performed sequentially.
Definition at line 230 of file FastCollection.java.
|
protectedinherited |
Returns the service implementation of this collection (for sub-classes).
Reimplemented from javolution.util.FastCollection< E >.
Definition at line 274 of file CollectionView.java.
|
staticprotectedinherited |
Returns the service implementation of any fast collection (for sub-classes).
Definition at line 647 of file FastCollection.java.
References javolution.util.FastCollection< E >.service().
E javolution.util.internal.table.SharedTableImpl< E >.set | ( | int | index, |
E | element | ||
) |
Definition at line 287 of file SharedTableImpl.java.
References javolution.util.internal.table.SharedTableImpl< E >.element(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.table.SharedTableImpl< E >.target(), javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Returns a thread-safe view over this collection. The shared view allows for concurrent read as long as there is no writer. The default implementation is based on readers-writers locks giving priority to writers. Iterators on shared collections are thread-safe (no ConcurrentModificationException possible).
Reimplemented in javolution.util.FastTable< E >, javolution.util.FastSet< E >, javolution.util.FastSortedTable< E >, and javolution.util.FastSortedSet< E >.
Definition at line 201 of file FastCollection.java.
|
inherited |
Returns the size of this collection.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 214 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Returns a view exposing elements sorted according to the collection order.
Definition at line 267 of file FastCollection.java.
Referenced by javolution.util.internal.collection.SortedCollectionImpl< E >.IteratorImpl.IteratorImpl().
|
inherited |
Returns a view exposing elements sorted according to the specified comparator.
Definition at line 275 of file FastCollection.java.
CollectionService<E> [] javolution.util.internal.table.SharedTableImpl< E >.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
|
Reimplemented from javolution.util.internal.collection.SharedCollectionImpl< E >.
Definition at line 297 of file SharedTableImpl.java.
References javolution.util.internal.table.SubTableImpl< E >.splitOf().
TableService<E> javolution.util.internal.table.SharedTableImpl< E >.subList | ( | int | fromIndex, |
int | toIndex | ||
) |
Implements javolution.util.service.TableService< E >.
Definition at line 302 of file SharedTableImpl.java.
|
protected |
Returns the actual target
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Reimplemented in javolution.util.internal.table.sorted.SharedSortedTableImpl< E >.
Definition at line 313 of file SharedTableImpl.java.
Referenced by javolution.util.internal.table.SharedTableImpl< E >.add(), javolution.util.internal.table.SharedTableImpl< E >.addAll(), javolution.util.internal.table.SharedTableImpl< E >.addFirst(), javolution.util.internal.table.SharedTableImpl< E >.addLast(), javolution.util.internal.table.SharedTableImpl< E >.get(), javolution.util.internal.table.SharedTableImpl< E >.getFirst(), javolution.util.internal.table.SharedTableImpl< E >.getLast(), javolution.util.internal.table.SharedTableImpl< E >.indexOf(), javolution.util.internal.table.SharedTableImpl< E >.iterator(), javolution.util.internal.table.SharedTableImpl< E >.lastIndexOf(), javolution.util.internal.table.SharedTableImpl< E >.listIterator(), javolution.util.internal.table.SharedTableImpl< E >.offerFirst(), javolution.util.internal.table.SharedTableImpl< E >.offerLast(), javolution.util.internal.table.SharedTableImpl< E >.peekFirst(), javolution.util.internal.table.SharedTableImpl< E >.peekLast(), javolution.util.internal.table.SharedTableImpl< E >.pollFirst(), javolution.util.internal.table.SharedTableImpl< E >.pollLast(), javolution.util.internal.table.SharedTableImpl< E >.remove(), javolution.util.internal.table.SharedTableImpl< E >.removeFirst(), javolution.util.internal.table.SharedTableImpl< E >.removeFirstOccurrence(), javolution.util.internal.table.SharedTableImpl< E >.removeLast(), javolution.util.internal.table.SharedTableImpl< E >.removeLastOccurrence(), javolution.util.internal.table.SharedTableImpl< E >.set(), and javolution.util.internal.table.SharedTableImpl< E >.SharedTableImpl().
TableService<E> javolution.util.internal.table.SharedTableImpl< E >.threadSafe | ( | ) |
Returns a thread-safe version of this service (used during parallel updates).
Reimplemented from javolution.util.internal.collection.SharedCollectionImpl< E >.
Reimplemented in javolution.util.internal.table.sorted.SharedSortedTableImpl< E >.
Definition at line 307 of file SharedTableImpl.java.
|
inherited |
Returns an array holding this collection elements.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 246 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
packageinherited |
Returns the specified array holding this collection elements if enough capacity.
Reimplemented from javolution.util.internal.collection.CollectionView< E >.
Definition at line 256 of file SharedCollectionImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.collection.SharedCollectionImpl< E >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.collection.CollectionView< E >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
packageinherited |
Returns an immutable reference over this collection. The immutable value is an unmodifiable view of this collection. The caller must guarantees that the original collection is never going to be updated (e.g. there is no reference left of the original collection).
Definition at line 585 of file FastCollection.java.
|
inherited |
Returns the string representation of this collection using its default format.
Definition at line 634 of file FastCollection.java.
References javolution.text.TextContext.getFormat().
|
inherited |
Returns an unmodifiable view over this collection. Any attempt to modify the collection through this view will result into a java.lang.UnsupportedOperationException being raised.
Reimplemented in javolution.util.FastTable< E >, javolution.util.FastSet< E >, javolution.util.FastSortedTable< E >, and javolution.util.FastSortedSet< E >.
Definition at line 239 of file FastCollection.java.
|
inherited |
Reimplemented in javolution.util.internal.collection.ParallelCollectionImpl< E >, javolution.util.internal.collection.AtomicCollectionImpl< E >, and javolution.util.internal.collection.SequentialCollectionImpl< E >.
Definition at line 266 of file CollectionView.java.
|
inherited |
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. |
|
inherited |
Executes the specified update action on this collection. That logic may be performed concurrently on sub-collections if this collection is parallel. For atomic collections the update is atomic (either concurrent readers see the full result of the action or nothing).
action | the update action. |
ClassCastException | if the action type is not compatible with this collection (e.g. action on set and this is a list). |
Definition at line 334 of file FastCollection.java.
Referenced by javolution.util.FastTable< javolution.xml.internal.stream.XMLStreamReaderImpl >.sort().
|
protectedinherited |
Definition at line 57 of file SharedCollectionImpl.java.
Referenced by javolution.util.internal.table.SharedTableImpl< E >.add(), javolution.util.internal.collection.SharedCollectionImpl< E >.add(), javolution.util.internal.table.SharedTableImpl< E >.addAll(), javolution.util.internal.collection.SharedCollectionImpl< E >.addAll(), javolution.util.internal.table.SharedTableImpl< E >.addFirst(), javolution.util.internal.table.sorted.SharedSortedTableImpl< E >.addIfAbsent(), javolution.util.internal.table.SharedTableImpl< E >.addLast(), javolution.util.internal.collection.SharedCollectionImpl< E >.clear(), javolution.util.internal.collection.SharedCollectionImpl< E >.clone(), javolution.util.internal.collection.SharedCollectionImpl< E >.contains(), javolution.util.internal.collection.SharedCollectionImpl< E >.containsAll(), javolution.util.internal.collection.SharedCollectionImpl< E >.equals(), javolution.util.internal.set.sorted.SharedSortedSetImpl< E >.first(), javolution.util.internal.table.SharedTableImpl< E >.get(), javolution.util.internal.table.SharedTableImpl< E >.getFirst(), javolution.util.internal.table.SharedTableImpl< E >.getLast(), javolution.util.internal.collection.SharedCollectionImpl< E >.hashCode(), javolution.util.internal.table.SharedTableImpl< E >.indexOf(), javolution.util.internal.collection.SharedCollectionImpl< E >.isEmpty(), javolution.util.internal.collection.SharedCollectionImpl< E >.IteratorImpl.IteratorImpl(), javolution.util.internal.set.sorted.SharedSortedSetImpl< E >.last(), javolution.util.internal.table.SharedTableImpl< E >.lastIndexOf(), javolution.util.internal.table.SharedTableImpl< E >.offerFirst(), javolution.util.internal.table.SharedTableImpl< E >.offerLast(), javolution.util.internal.table.SharedTableImpl< E >.peekFirst(), javolution.util.internal.table.SharedTableImpl< E >.peekLast(), javolution.util.internal.collection.SharedCollectionImpl< E >.perform(), javolution.util.internal.table.SharedTableImpl< E >.pollFirst(), javolution.util.internal.table.SharedTableImpl< E >.pollLast(), javolution.util.internal.table.sorted.SharedSortedTableImpl< E >.positionOf(), javolution.util.internal.collection.SharedCollectionImpl< E >.remove(), javolution.util.internal.table.SharedTableImpl< E >.remove(), javolution.util.internal.collection.SharedCollectionImpl< E >.removeAll(), javolution.util.internal.table.SharedTableImpl< E >.removeFirst(), javolution.util.internal.table.SharedTableImpl< E >.removeFirstOccurrence(), javolution.util.internal.table.SharedTableImpl< E >.removeLast(), javolution.util.internal.table.SharedTableImpl< E >.removeLastOccurrence(), javolution.util.internal.collection.SharedCollectionImpl< E >.retainAll(), javolution.util.internal.table.SharedTableImpl< E >.set(), javolution.util.internal.collection.SharedCollectionImpl< E >.SharedCollectionImpl(), javolution.util.internal.collection.SharedCollectionImpl< E >.size(), javolution.util.internal.collection.SharedCollectionImpl< E >.split(), and javolution.util.internal.collection.SharedCollectionImpl< E >.toArray().
|
staticprivate |
Definition at line 25 of file SharedTableImpl.java.