public final class IntIntOrderedMap.KeySet
extends java.lang.Object
implements java.util.SortedSet<java.lang.Integer>, java.io.Serializable
Constructor and Description |
---|
KeySet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Integer o)
Always throws an UnsupportedOperationException
|
boolean |
addAll(java.util.Collection<? extends java.lang.Integer> c)
Adds all elements of the given collection to this collection.
|
void |
clear() |
java.util.Comparator<java.lang.Integer> |
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) |
java.lang.Integer |
first() |
java.util.SortedSet<java.lang.Integer> |
headSet(java.lang.Integer to) |
boolean |
isEmpty() |
IntIntOrderedMap.KeyIterator |
iterator() |
java.lang.Integer |
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<java.lang.Integer> |
subSet(java.lang.Integer from,
java.lang.Integer to) |
java.util.SortedSet<java.lang.Integer> |
tailSet(java.lang.Integer from) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int[] |
toIntArray() |
int[] |
toIntArray(int[] a) |
java.lang.String |
toString() |
int |
unwrap(IntIntOrderedMap.KeyIterator i,
int[] array)
Unwraps an iterator into an array.
|
int |
unwrap(IntIntOrderedMap.KeyIterator i,
int[] array,
int offset,
int max)
Unwraps an iterator into an array starting at a given offset for a given number of elements.
|
int |
unwrap(IntIntOrderedMap.KeyIterator i,
java.lang.Object[] array)
Unwraps an iterator into an array.
|
int |
unwrap(IntIntOrderedMap.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 IntIntOrderedMap.KeyIterator iterator()
iterator
in interface java.lang.Iterable<java.lang.Integer>
iterator
in interface java.util.Collection<java.lang.Integer>
iterator
in interface java.util.Set<java.lang.Integer>
public int size()
size
in interface java.util.Collection<java.lang.Integer>
size
in interface java.util.Set<java.lang.Integer>
public void clear()
clear
in interface java.util.Collection<java.lang.Integer>
clear
in interface java.util.Set<java.lang.Integer>
public java.lang.Integer first()
first
in interface java.util.SortedSet<java.lang.Integer>
public java.lang.Integer last()
last
in interface java.util.SortedSet<java.lang.Integer>
public java.util.Comparator<java.lang.Integer> comparator()
comparator
in interface java.util.SortedSet<java.lang.Integer>
public final java.util.SortedSet<java.lang.Integer> tailSet(java.lang.Integer from)
tailSet
in interface java.util.SortedSet<java.lang.Integer>
public final java.util.SortedSet<java.lang.Integer> headSet(java.lang.Integer to)
headSet
in interface java.util.SortedSet<java.lang.Integer>
public final java.util.SortedSet<java.lang.Integer> subSet(java.lang.Integer from, java.lang.Integer to)
subSet
in interface java.util.SortedSet<java.lang.Integer>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Integer>
toArray
in interface java.util.Set<java.lang.Integer>
public boolean remove(java.lang.Object ok)
remove
in interface java.util.Collection<java.lang.Integer>
remove
in interface java.util.Set<java.lang.Integer>
public boolean add(java.lang.Integer o)
add
in interface java.util.Collection<java.lang.Integer>
add
in interface java.util.Set<java.lang.Integer>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<java.lang.Integer>
contains
in interface java.util.Set<java.lang.Integer>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<java.lang.Integer>
containsAll
in interface java.util.Set<java.lang.Integer>
c
- a type-specific collection.true
if this collection contains all elements of the argument.public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<java.lang.Integer>
retainAll
in interface java.util.Set<java.lang.Integer>
c
- a type-specific collection.true
if this collection changed as a result of the call.public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<java.lang.Integer>
removeAll
in interface java.util.Set<java.lang.Integer>
c
- a type-specific collection.true
if this collection changed as a result of the call.public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Integer>
toArray
in interface java.util.Set<java.lang.Integer>
public boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
addAll
in interface java.util.Collection<java.lang.Integer>
addAll
in interface java.util.Set<java.lang.Integer>
c
- a collection.true
if this collection changed as a result of the call.public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<java.lang.Integer>
equals
in interface java.util.Set<java.lang.Integer>
equals
in class java.lang.Object
public int unwrap(IntIntOrderedMap.KeyIterator i, int[] 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(IntIntOrderedMap.KeyIterator i, int[] 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 int[] toIntArray()
public int[] toIntArray(int[] a)
public int unwrap(IntIntOrderedMap.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(IntIntOrderedMap.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()
isEmpty
in interface java.util.Collection<java.lang.Integer>
isEmpty
in interface java.util.Set<java.lang.Integer>
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © Eben Howard 2012–2022. All rights reserved.