Top Description Inners Fields Constructors Methods
java.util

pack-priv Class ImmutableCollections

Additional top-level class in compilation unit: CollSer.

extends Object
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.io.IOException, .InvalidObjectException, .ObjectInputStream, .ObjectOutputStream, .ObjectStreamException, .Serializable, java.lang.reflect.Array, java.util.function.BiFunction, .Function, .Predicate, .UnaryOperator, jdk.internal.access.JavaUtilCollectionAccess, .SharedSecrets, jdk.internal.misc.CDS, jdk.internal.vm.annotation.Stable

Container class for immutable collections. Not part of the public API. Mainly for namespace management and shared infrastructure. Serial warnings are suppressed throughout because all implementation classes use a serial proxy and thus have no need to declare serialVersionUID.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
pack-priv abstract static class
pack-priv abstract static class
pack-priv abstract static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
ImmutableCollections.MapN<
the key type
K
,
the value type
V
>

An array-based Map implementation.

pack-priv static class
pack-priv static class
ImmutableCollections.SetN<
the element type
E
>

An array-based Set implementation.

pack-priv static class

Field Summary

Modifier and TypeField and Description
private static Object[]
archivedObjects

Constants following this might be initialized from the CDS archive via this array.

private static final Object
pack-priv static final ImmutableCollections.ListN<?>
pack-priv static final ImmutableCollections.ListN<?>
pack-priv static final ImmutableCollections.MapN<?, ?>
pack-priv static final ImmutableCollections.SetN<?>
pack-priv static final int
EXPAND_FACTOR

The reciprocal of load factor.

private static final boolean
REVERSE

For set and map iteration, we will iterate in "reverse" stochastically, decided at bootstrap time.

private static final long
SALT32L

A "salt" value used for randomizing iteration order.

Constructor Summary

AccessConstructor and Description
private
ImmutableCollections()

No instances.

Method Summary

Modifier and TypeMethod and Description
pack-priv static <
the List's element type
E
>
List<E>

Returns:

the new list
listCopy
(Collection<? extends E>
the input collection
coll
)

Copies a collection into a new List, unless the arg is already a safe, null-prohibiting unmodifiable list, in which case the arg itself is returned.

pack-priv static <
the List's element type
E
>
List<E>

Returns:

the new list
listFromArray
(E...
the input array
input
)

Creates a new List from an untrusted array, creating a new array for internal storage, and checking for and rejecting null elements.

pack-priv static <
the List's element type
E
>
List<E>

Returns:

the new list
listFromTrustedArray
(Object...
the input array
input
)

Creates a new List from a trusted array, checking for and rejecting null elements.

pack-priv static <
the List's element type
E
>
List<E>

Returns:

the new list
listFromTrustedArrayNullsAllowed
(Object...
the input array
input
)

Creates a new List from a trusted array, allowing null elements.

pack-priv static UnsupportedOperationException
uoe()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait