public final class OrderedMap.KeySet
extends java.lang.Object
implements java.util.SortedSet<K>, java.io.Serializable
Constructor and Description |
---|
KeySet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(K o)
Always throws an UnsupportedOperationException
|
boolean |
addAll(java.util.Collection<? extends K> c)
Adds all elements of the given collection to this collection.
|
void |
clear() |
java.util.Comparator<K> |
comparator() |
boolean |
contains(java.lang.Object o)
Delegates to the corresponding type-specific method.
|
boolean |
containsAll(java.util.Collection<?> c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
equals(java.lang.Object o) |
K |
first() |
java.util.SortedSet<K> |
headSet(K to) |
boolean |
isEmpty() |
OrderedMap.KeyIterator |
iterator() |
K |
last() |
boolean |
remove(java.lang.Object ok)
Always throws an UnsupportedOperationException
|
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
retainAll(java.util.Collection<?> c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
java.util.SortedSet<K> |
subSet(K from,
K to) |
java.util.SortedSet<K> |
tailSet(K from) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
int |
unwrap(OrderedMap.KeyIterator i,
java.lang.Object[] array)
Unwraps an iterator into an array.
|
int |
unwrap(OrderedMap.KeyIterator i,
java.lang.Object[] array,
int offset,
int max)
Unwraps an iterator into an array starting at a given offset for a given number of elements.
|
public OrderedMap.KeyIterator iterator()
public int size()
public void clear()
public java.util.Comparator<K> comparator()
comparator
in interface java.util.SortedSet<K>
public final java.util.SortedSet<K> tailSet(K from)
tailSet
in interface java.util.SortedSet<K>
public final java.util.SortedSet<K> headSet(K to)
headSet
in interface java.util.SortedSet<K>
public final java.util.SortedSet<K> subSet(K from, K to)
subSet
in interface java.util.SortedSet<K>
public <T> T[] toArray(T[] a)
public boolean remove(java.lang.Object ok)
public boolean add(K o)
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public java.lang.Object[] toArray()
public boolean addAll(java.util.Collection<? extends K> c)
public boolean equals(java.lang.Object o)
public int unwrap(OrderedMap.KeyIterator i, java.lang.Object[] array, int offset, int max)
This method iterates over the given type-specific iterator and stores the elements returned, up to a maximum of length
, in the given array starting at offset
. The
number of actually unwrapped elements is returned (it may be less than max
if the iterator emits less than max
elements).
i
- a type-specific iterator.array
- an array to contain the output of the iterator.offset
- the first element of the array to be returned.max
- the maximum number of elements to unwrap.public int unwrap(OrderedMap.KeyIterator i, java.lang.Object[] array)
This method iterates over the given type-specific iterator and stores the elements returned in the given array. The iteration will stop when the iterator has no more elements or when the end of the array has been reached.
i
- a type-specific iterator.array
- an array to contain the output of the iterator.public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © Eben Howard 2012–2022. All rights reserved.