All Packages Class Hierarchy This Package Previous Next Index
Class collections.RBMap
java.lang.Object
|
+----collections.UpdatableImpl
|
+----collections.UpdatableMapImpl
|
+----collections.RBMap
- public class RBMap
- extends UpdatableMapImpl
- implements UpdatableMap, KeySortedCollection
RedBlack Trees of (key, element) pairs
-
cmp_
- The comparator to use for ordering
-
tree_
- The root of the tree.
-
RBMap()
- Make an empty tree, using DefaultComparator for ordering
-
RBMap(Comparator)
- Make an empty tree, using given Comparator for ordering
-
RBMap(Predicate)
- Make an empty tree, using given screener for screening elements (not keys)
-
RBMap(Predicate, Comparator)
- Make an empty tree, using given screener and Comparator.
-
RBMap(Predicate, Comparator, RBPair, int)
- Special version of constructor needed by clone()
-
aKeyOf(Object)
- Implements collections.Map.aKeyOf.
-
at(Object)
- Implements collections.Map.at.
-
checkImplementation()
- Implements collections.ImplementationCheckable.checkImplementation.
-
clear()
- Implements collections.UpdatableCollection.clear.
-
clone()
- Create an independent copy.
-
comparator(Comparator)
- Use a new comparator.
-
elements()
- Implements collections.Collection.elements.
-
exclude(Object)
- Implements collections.UpdatableCollection.exclude.
-
includes(Object)
- Implements collections.Collection.includes.
-
includesAt(Object, Object)
- Implements collections.Map.includes.
-
includesKey(Object)
- Implements collections.Map.includesKey.
-
keyComparator()
- Implements collections.KeySortedCollection.keyComparator
Time complexity: O(1).
-
keys()
- Implements collections.Map.keys.
-
occurrencesOf(Object)
- Implements collections.Collection.occurrencesOf.
-
putAt(Object, Object)
- Implements collections.UpdatableMap.putAt.
-
removeAt(Object)
- Implements collections.UpdatableMap.removeAt.
-
removeOneOf(Object)
- Implements collections.UpdatableCollection.removeOneOf.
-
replaceAllOf(Object, Object)
- Implements collections.UpdatableCollection.replaceAllOf.
-
replaceElement(Object, Object, Object)
- Implements collections.UpdatableMap.replaceElement.
-
replaceOneOf(Object, Object)
- Implements collections.UpdatableCollection.replaceOneOf.
-
take()
- Implements collections.UpdatableCollection.take.
tree_
protected RBPair tree_
- The root of the tree. Null iff empty.
cmp_
protected Comparator cmp_
- The comparator to use for ordering
RBMap
public RBMap()
- Make an empty tree, using DefaultComparator for ordering
RBMap
public RBMap(Predicate screener)
- Make an empty tree, using given screener for screening elements (not keys)
RBMap
public RBMap(Comparator c)
- Make an empty tree, using given Comparator for ordering
RBMap
public RBMap(Predicate s,
Comparator c)
- Make an empty tree, using given screener and Comparator.
RBMap
protected RBMap(Predicate s,
Comparator cmp,
RBPair t,
int n)
- Special version of constructor needed by clone()
clone
protected Object clone() throws CloneNotSupportedException
- Create an independent copy. Does not clone elements.
- Overrides:
- clone in class Object
includes
public synchronized boolean includes(Object element)
- Implements collections.Collection.includes.
Time complexity: O(log n).
- Overrides:
- includes in class UpdatableImpl
- See Also:
- includes
occurrencesOf
public synchronized int occurrencesOf(Object element)
- Implements collections.Collection.occurrencesOf.
Time complexity: O(log n).
- Overrides:
- occurrencesOf in class UpdatableImpl
- See Also:
- occurrencesOf
elements
public synchronized CollectionEnumeration elements()
- Implements collections.Collection.elements.
Time complexity: O(1).
- Overrides:
- elements in class UpdatableImpl
- See Also:
- elements
keyComparator
public synchronized Comparator keyComparator()
- Implements collections.KeySortedCollection.keyComparator
Time complexity: O(1).
- See Also:
- keyComparator
comparator
public synchronized void comparator(Comparator cmp)
- Use a new comparator. Causes a reorganization
includesKey
public synchronized boolean includesKey(Object key)
- Implements collections.Map.includesKey.
Time complexity: O(log n).
- Overrides:
- includesKey in class UpdatableMapImpl
- See Also:
- includesKey
includesAt
public synchronized boolean includesAt(Object key,
Object element)
- Implements collections.Map.includes.
Time complexity: O(n).
- Overrides:
- includesAt in class UpdatableMapImpl
- See Also:
- includes
keys
public synchronized CollectionEnumeration keys()
- Implements collections.Map.keys.
Time complexity: O(1).
- Overrides:
- keys in class UpdatableMapImpl
- See Also:
- keys
at
public synchronized Object at(Object key) throws NoSuchElementException
- Implements collections.Map.at.
Time complexity: O(log n).
- Overrides:
- at in class UpdatableMapImpl
- See Also:
- at
aKeyOf
public synchronized Object aKeyOf(Object element)
- Implements collections.Map.aKeyOf.
Time complexity: O(n).
- Overrides:
- aKeyOf in class UpdatableMapImpl
- See Also:
- aKeyOf
clear
public synchronized void clear()
- Implements collections.UpdatableCollection.clear.
Time complexity: O(1).
- Overrides:
- clear in class UpdatableImpl
- See Also:
- clear
exclude
public synchronized void exclude(Object element)
- Implements collections.UpdatableCollection.exclude.
Time complexity: O(n).
- Overrides:
- exclude in class UpdatableImpl
- See Also:
- exclude
removeOneOf
public synchronized void removeOneOf(Object element)
- Implements collections.UpdatableCollection.removeOneOf.
Time complexity: O(n).
- Overrides:
- removeOneOf in class UpdatableImpl
- See Also:
- removeOneOf
replaceOneOf
public synchronized void replaceOneOf(Object oldElement,
Object newElement) throws IllegalElementException
- Implements collections.UpdatableCollection.replaceOneOf.
Time complexity: O(n).
- Overrides:
- replaceOneOf in class UpdatableImpl
- See Also:
- replaceOneOf
replaceAllOf
public synchronized void replaceAllOf(Object oldElement,
Object newElement) throws IllegalElementException
- Implements collections.UpdatableCollection.replaceAllOf.
Time complexity: O(n).
- Overrides:
- replaceAllOf in class UpdatableImpl
- See Also:
- replaceAllOf
take
public synchronized Object take() throws NoSuchElementException
- Implements collections.UpdatableCollection.take.
Time complexity: O(log n).
Takes the element associated with the least key.
- Overrides:
- take in class UpdatableImpl
- See Also:
- take
putAt
public synchronized void putAt(Object key,
Object element)
- Implements collections.UpdatableMap.putAt.
Time complexity: O(log n).
- Overrides:
- putAt in class UpdatableMapImpl
- See Also:
- putAt
removeAt
public synchronized void removeAt(Object key)
- Implements collections.UpdatableMap.removeAt.
Time complexity: O(log n).
- Overrides:
- removeAt in class UpdatableMapImpl
- See Also:
- removeAt
replaceElement
public synchronized void replaceElement(Object key,
Object oldElement,
Object newElement) throws IllegalElementException
- Implements collections.UpdatableMap.replaceElement.
Time complexity: O(log n).
- Overrides:
- replaceElement in class UpdatableMapImpl
- See Also:
- replaceElement
checkImplementation
public void checkImplementation() throws ImplementationError
- Implements collections.ImplementationCheckable.checkImplementation.
- Overrides:
- checkImplementation in class UpdatableImpl
- See Also:
- checkImplementation
All Packages Class Hierarchy This Package Previous Next Index