public final class KeyCollection<TKey extends java.lang.Comparable<TKey>,TValue> extends java.lang.Object implements java.util.Collection<TKey>, ReifiedIterable<TKey>
Constructor and Description |
---|
KeyCollection(AvlHashtable<TKey,TValue> dictionary,
java.lang.Class<?> genericTypeParameterKey)
Initializes with a new key collection.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(TKey tKey)
Deprecated.
|
boolean |
addAll(java.util.Collection<? extends TKey> c)
Deprecated.
|
void |
clear()
Deprecated.
|
boolean |
contains(java.lang.Object item)
Returns true if this collection contains the specified element.
|
boolean |
contains(TKey item)
Returns true if this collection contains the specified element.
|
boolean |
containsAll(java.util.Collection<?> collection)
Returns true if this collection contains all the specified elements.
|
java.lang.Class<?> |
getGenericTypeParameter()
Returns the class generic type parameters.
|
boolean |
isEmpty()
Returns true if empty.
|
java.util.Iterator<TKey> |
iterator() |
boolean |
remove(java.lang.Object o)
Deprecated.
|
boolean |
removeAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
int |
size()
Returns the size of the collection.
|
TKey[] |
toArray()
Returns the key of all key/value pairs, in ascending key order.
|
<T> T[] |
toArray(T[] array)
Deprecated.
|
ReifiedList<TKey> |
toList()
Returns the key of all key/value pairs, in ascending key order.
|
public KeyCollection(AvlHashtable<TKey,TValue> dictionary, java.lang.Class<?> genericTypeParameterKey)
public boolean contains(java.lang.Object item)
contains
in interface java.util.Collection<TKey extends java.lang.Comparable<TKey>>
item
- Element whose presence in this collection is to be tested.java.lang.ClassCastException
- The item is not of correct type.java.lang.NullPointerException
- The specified element is null.public boolean contains(TKey item)
item
- Element whose presence in this collection is to be tested.java.lang.NullPointerException
- The specified element is null.public boolean containsAll(java.util.Collection<?> collection)
containsAll
in interface java.util.Collection<TKey extends java.lang.Comparable<TKey>>
collection
- Contains all elements to search for.java.lang.ClassCastException
- An item is not of correct type.java.lang.NullPointerException
- The specified collection is null.public java.lang.Class<?> getGenericTypeParameter()
getGenericTypeParameter
in interface ReifiedIterable<TKey extends java.lang.Comparable<TKey>>
public boolean isEmpty()
public java.util.Iterator<TKey> iterator()
public int size()
public ReifiedList<TKey> toList()
public TKey[] toArray()
@Deprecated public <T> T[] toArray(T[] array)
@Deprecated public boolean add(TKey tKey)
@Deprecated public boolean remove(java.lang.Object o)
@Deprecated public boolean addAll(java.util.Collection<? extends TKey> c)
@Deprecated public boolean removeAll(java.util.Collection<?> c)
@Deprecated public boolean retainAll(java.util.Collection<?> c)