THE Java™ Programming Language, Fourth Edition
interface and be mutually comparable. publictreeMap(Map<? extends K,? extends V> map) Equivalent to using TReeMap() and th ...
Creates an empty EnumSet that can contain elements of the given enum type. public static <E extends Enum<E>> EnumSet ...
21.9.2. EnumMap The EnumMap<KextendsEnum,V> is a special map that uses enum values as keys. All values in the map must com ...
public static <T extends Object & Comparable<? super T>> T min(Collection<? extends T> coll) Returns the s ...
There are numerous methods for working with lists: public static <T> booleanreplaceAll(List<T> list, T oldVal, T new ...
Returns the index of the start of the first sublist of source that is equal to target. public static intlastIndexOfSubList(List& ...
If you invoke one of the sorting or searching methods that relies on ordering on a list that contains objects that are not mutua ...
Unmodifiable wrappers are a reasonable way to expose information that may be changing but that shouldn't be changed by the obser ...
latter are provided in the java.util.concurrent subpackage. 21.11.1. The Synchronized Wrappers A synchronized wrapper passes thr ...
} If you use an unsynchronized collection concurrently the result is undefinedif you are lucky the error will be detected by the ...
there is no inherent limit Integer.MAX_VALUE is returned. If there is a capacity limit then Collection.add will throw IllegalSta ...
number of such methods: public VputIfAbsent(K key, V value) Atomically stores the given value in the map only if a mapping for k ...
implementation would use a technique that is not worse than O(nlogn) binarySearch Searches a sorted array for a given key. Retur ...
public boolean hasNext() { if (nextShort != null) // found it already return true; while (strings.hasNext()) { nextShort = strin ...
the list of strings, and finding no more short ones, return false. When remove was invoked, it would invoke remove on the underl ...
AbstractQueue has the same requirements as AbstractCollection, with the additional requirements that you must implement offer, p ...
AbstractList, the modifying methods of the iteration will properly reflect the modifiability of your class. The Iterator impleme ...
each element to get to the next. A linked list is a sequential access data store. By contrast, an array can be randomly accessed ...
Of these types, only Properties is in active useit is used to contain system properties, as described in "System Properties" on ...
Analogous to set(index,elem). public final voidremoveElementAt(int index) Analogous to remove(index). public final booleanremove ...
«
20
21
22
23
24
25
26
27
28
29
»
Free download pdf