Module org.jhotdraw8.fxcollection
Class IndexedArrayObservableSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
javafx.collections.ObservableListBase<E>
org.jhotdraw8.fxcollection.indexedset.AbstractIndexedArrayObservableSet<E>
org.jhotdraw8.fxcollection.indexedset.IndexedArrayObservableSet<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>,SequencedCollection<E>,Set<E>,javafx.beans.Observable,javafx.collections.ObservableList<E>,ReadOnlyCollection<E>,ReadOnlySequencedCollection<E>,ReadOnlySequencedSet<E>,ReadOnlySet<E>
A set that provides precise control where each element is inserted;
this set is backed by an array.
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanmayBeAdded(@NonNull E e) Returns true if the specified element can be added to this set.protected voidThis method is invoked after an element has been added.onContains(E e) This method is called, when aAbstractIndexedArrayObservableSet.contains(Object)check is needed.protected voidThis method is invoked after an element has been removed.Methods inherited from class org.jhotdraw8.fxcollection.indexedset.AbstractIndexedArrayObservableSet
add, add, addAll, addAll, contains, doAdd, equals, fireItemUpdated, get, getFirst, getLast, hasChangeListeners, hashCode, indexOf, iterator, listIterator, move, readOnlyReversed, remove, remove, removeAll, removeRange, retainAll, set, setAll, size, spliterator, stream, subListMethods inherited from class javafx.collections.ObservableListBase
addAll, addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, remove, removeAll, removeListener, removeListener, retainAll, setAllMethods inherited from class java.util.AbstractList
clear, lastIndexOf, listIteratorMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, toArrayMethods inherited from interface java.util.List
addFirst, addLast, clear, containsAll, isEmpty, lastIndexOf, listIterator, removeFirst, removeLast, replaceAll, reversed, sort, toArray, toArrayMethods inherited from interface javafx.beans.Observable
subscribeMethods inherited from interface javafx.collections.ObservableList
filtered, sorted, sortedMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
containsAll, isEmpty, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedCollection
asCollectionMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedSet
asSetMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySet
characteristics
-
Constructor Details
-
IndexedArrayObservableSet
public IndexedArrayObservableSet() -
IndexedArrayObservableSet
-
-
Method Details
-
onRemoved
Description copied from class:AbstractIndexedArrayObservableSetThis method is invoked after an element has been removed.Subclasses can implement this method to remove it from a data structure that can answer
AbstractIndexedArrayObservableSet.onContains(E).- Specified by:
onRemovedin classAbstractIndexedArrayObservableSet<E>- Parameters:
e- the removed element
-
onAdded
Description copied from class:AbstractIndexedArrayObservableSetThis method is invoked after an element has been added.Subclasses can implement this method to add it from a data structure that can answer
AbstractIndexedArrayObservableSet.onContains(E).- Specified by:
onAddedin classAbstractIndexedArrayObservableSet<E>- Parameters:
e- the added element
-
onContains
Description copied from class:AbstractIndexedArrayObservableSetThis method is called, when aAbstractIndexedArrayObservableSet.contains(Object)check is needed.Subclasses can implement this method to provide a fast contains check.
- Specified by:
onContainsin classAbstractIndexedArrayObservableSet<E>- Parameters:
e- an object- Returns:
- true if the object is a member of this set, false if the object is not a member of this set, null if it is not known whether the object is a member of the set or not
-
mayBeAdded
Description copied from class:AbstractIndexedArrayObservableSetReturns true if the specified element can be added to this set.Subclasses can return false if they only want to include elements based on a predicate check.
- Specified by:
mayBeAddedin classAbstractIndexedArrayObservableSet<E>- Parameters:
e- an object- Returns:
- true if the object may be added to this set
-