public class IntSortedSet extends AbstractSet<Integer> implements Serializable, SortedSet<Integer>
Constructor and Description |
---|
IntSortedSet() |
IntSortedSet(Collection<Integer> collection)
Creates a set of integers from the given collection
|
IntSortedSet(int initialSize) |
IntSortedSet(Set<Integer> set)
Creates a new set of integers from the given set
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Integer e) |
Comparator<? super Integer> |
comparator() |
boolean |
contains(int o) |
boolean |
contains(Object o) |
Integer |
first() |
static IntSortedSet |
from(int... ints)
Creates a set of integers from the given list of integers.
|
SortedSet<Integer> |
headSet(Integer toElement) |
Iterator<Integer> |
iterator() |
Integer |
last() |
int |
size() |
SortedSet<Integer> |
subSet(Integer fromElement,
Integer toElement) |
SortedSet<Integer> |
tailSet(Integer fromElement) |
equals, hashCode, removeAll
addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
parallelStream, removeIf, stream
public IntSortedSet(int initialSize)
public IntSortedSet(Set<Integer> set)
set
- the set of integers to create a copy ofpublic IntSortedSet(Collection<Integer> collection)
collection
- a collection of integers to create a set frompublic IntSortedSet()
public static IntSortedSet from(int... ints)
ints
- a list of integers to create a set frompublic boolean add(Integer e)
add
in interface Collection<Integer>
add
in interface Set<Integer>
add
in class AbstractCollection<Integer>
public boolean contains(int o)
public boolean contains(Object o)
contains
in interface Collection<Integer>
contains
in interface Set<Integer>
contains
in class AbstractCollection<Integer>
public int size()
size
in interface Collection<Integer>
size
in interface Set<Integer>
size
in class AbstractCollection<Integer>
public Comparator<? super Integer> comparator()
comparator
in interface SortedSet<Integer>
Copyright © 2017. All rights reserved.