| Package | Description |
|---|---|
| java.util |
| Modifier and Type | Field and Description |
|---|---|
static List |
Collections.EMPTY_LIST
An empty immutable instance of
List. |
static Map |
Collections.EMPTY_MAP
An empty immutable instance of
Map. |
static Set |
Collections.EMPTY_SET
An empty immutable instance of
Set. |
| Modifier and Type | Method and Description |
|---|---|
static <T> int |
Collections.binarySearch(List<? extends Comparable<? super T>> list,
T object)
Performs a binary search for the specified element in the specified
sorted list.
|
static <T> int |
Collections.binarySearch(List<? extends T> list,
T object,
Comparator<? super T> comparator)
Performs a binary search for the specified element in the specified
sorted list using the specified comparator.
|
static int |
Arrays.binarySearch(Object[] array,
int startIndex,
int endIndex,
Object object)
Performs a binary search for the specified element in a part of the
specified sorted array.
|
static int |
Arrays.binarySearch(Object[] array,
Object object)
Performs a binary search for the specified element in the specified
sorted array.
|
void |
ArrayDeque.clear()
Empty the deque.
|
boolean |
ArrayDeque.contains(Object obj)
Returns true if the specified element is in the deque.
|
boolean |
TreeMap.containsKey(Object key)
Returns whether this map contains the specified key.
|
E |
Vector.elementAt(int location)
Returns the element at the specified location in this vector.
|
Enumeration<V> |
Hashtable.elements()
Returns an enumeration on the values of this
Hashtable. |
static <T> List<T> |
Collections.emptyList()
Returns a type-safe empty, immutable
List. |
static <K,V> Map<K,V> |
Collections.emptyMap()
Returns a type-safe empty, immutable
Map. |
static <T> Set<T> |
Collections.emptySet()
Returns a type-safe empty, immutable
Set. |
E |
Vector.firstElement()
Returns the first element in this vector.
|
V |
TreeMap.get(Object key)
Returns the value of the mapping with the specified key.
|
SortedSet<E> |
TreeSet.headSet(E end)
Answers a SortedSet of the specified portion of this TreeSet which
contains elements less than the end element.
|
NavigableSet<E> |
TreeSet.headSet(E end,
boolean endInclusive)
Answers a NavigableSet of the specified portion of this set which
contains elements less than (or equal to, depends on endInclusive) the
end element.
|
Iterator<E> |
ArrayDeque.iterator()
Returns the iterator of the deque.
|
Enumeration<K> |
Hashtable.keys()
Returns an enumeration on the keys of this
Hashtable instance. |
E |
Vector.lastElement()
Returns the last element in this vector.
|
NavigableSet<K> |
TreeMap.navigableKeySet()
Answers a NavigableSet view of the keys in ascending order.
|
void |
Observable.notifyObservers(Object data)
If
hasChanged() returns true, calls the update()
method for every Observer in the list of observers using the specified
argument. |
E |
Stack.peek()
Returns the element at the top of the stack without removing it.
|
E |
Stack.pop()
Returns the element at the top of the stack and removes it.
|
E |
Vector.remove(int location)
Removes the object at the specified location from this vector.
|
V |
TreeMap.remove(Object key)
Removes the mapping with the specified key from this map.
|
static void |
Collections.reverse(List<?> list)
Modifies the specified
List by reversing the order of the
elements. |
static <T> Comparator<T> |
Collections.reverseOrder()
A comparator which reverses the natural order of the elements.
|
static void |
Collections.rotate(List<?> lst,
int dist)
Rotates the elements in
list by the distance dist |
E |
Vector.set(int location,
E object)
Replaces the element at the specified location in this vector with the
specified object.
|
static <T extends Comparable<? super T>> |
Collections.sort(List<T> list)
Sorts the specified list in ascending natural order.
|
static <T> void |
Collections.sort(List<T> list,
Comparator<? super T> comparator)
Sorts the specified list using the specified comparator.
|
NavigableSet<E> |
TreeSet.subSet(E start,
boolean startInclusive,
E end,
boolean endInclusive)
Answers a NavigableSet of the specified portion of this set which
contains elements greater (or equal to, depends on startInclusive) the
start element but less than (or equal to, depends on endInclusive) the
end element.
|
SortedSet<E> |
TreeSet.subSet(E start,
E end)
Answers a SortedSet of the specified portion of this TreeSet which
contains elements greater or equal to the start element but less than the
end element.
|
static void |
Collections.swap(List<?> list,
int index1,
int index2)
Swaps the elements of list
list at indices index1 and
index2. |
SortedSet<E> |
TreeSet.tailSet(E start)
Answers a SortedSet of the specified portion of this TreeSet which
contains elements greater or equal to the start element.
|
NavigableSet<E> |
TreeSet.tailSet(E start,
boolean startInclusive)
Answers a NavigableSet of the specified portion of this set which
contains elements greater (or equal to, depends on startInclusive) the
start element.
|
<T> T[] |
Vector.toArray(T[] contents)
Returns an array containing all elements contained in this vector.
|
<T> T[] |
LinkedList.toArray(T[] contents)
Returns an array containing all elements contained in this
LinkedList. |
<T> T[] |
ArrayList.toArray(T[] contents)
Returns an array containing all elements contained in this
ArrayList. |
<T> T[] |
AbstractList.toArray(T[] contents)
Returns an array containing all elements contained in this
ArrayList. |
<T> T[] |
AbstractCollection.toArray(T[] contents)
Returns an array containing all elements contained in this
ArrayList. |
static <E> Collection<E> |
Collections.unmodifiableCollection(Collection<? extends E> collection)
Returns a wrapper on the specified collection which throws an
UnsupportedOperationException whenever an attempt is made to
modify the collection. |
static <E> List<E> |
Collections.unmodifiableList(List<? extends E> list)
Returns a wrapper on the specified list which throws an
UnsupportedOperationException whenever an attempt is made to
modify the list. |
static <K,V> Map<K,V> |
Collections.unmodifiableMap(Map<? extends K,? extends V> map)
Returns a wrapper on the specified map which throws an
UnsupportedOperationException whenever an attempt is made to
modify the map. |
static <E> Set<E> |
Collections.unmodifiableSet(Set<? extends E> set)
Returns a wrapper on the specified set which throws an
UnsupportedOperationException whenever an attempt is made to
modify the set. |
static <K,V> SortedMap<K,V> |
Collections.unmodifiableSortedMap(SortedMap<K,? extends V> map)
Returns a wrapper on the specified sorted map which throws an
UnsupportedOperationException whenever an attempt is made to
modify the sorted map. |
| Modifier and Type | Method and Description |
|---|---|
V |
AbstractMap.put(K key,
V value)
Maps the specified key to the specified value.
|
V |
AbstractMap.put(K key,
V value)
Maps the specified key to the specified value.
|
V |
AbstractMap.SimpleImmutableEntry.setValue(V object)
Throws an UnsupportedOperationException.
|
| Constructor and Description |
|---|
ArrayDeque(Collection<? extends E> c)
Constructs a new instance of ArrayDeque containing the elements of the
specified collection, with the order returned by the collection's
iterator.
|
ArrayDeque(int minSize)
Constructs a new empty instance of ArrayDeque big enough for specified
number of elements.
|
Copyright © 2022. All rights reserved.