APIdia Launch Partner
Top Description Constructors Methods
jdk.jpackage.internal.util

public final Class CollectionUtils

extends Object
Class Inheritance
Imports
java.util.Collection

This class consists exclusively of static methods that operate on or return collections.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <
the type of elements in this output collection
T extends B
,
the type of elements in this input collection
B
,
the output collection type
C extends Collection<T>
>
C

Returns:

the input collection cast to the requested type
toCollection
(Collection<B>
the input collection. Null is permitted.
v
)

Casts the given collection to the requested type.

public static <
the type of elements in this output collection
T extends B
,
the upper bound type of elements in this input collection
B
,
the output collection type
C extends Collection<T>
>
C

Returns:

the input collection cast to the requested type
toCollectionUBW
(Collection<? extends B>
the input collection. Null is permitted.
v
)

Casts the given collection to the requested upper bounded wildcard (UBW) type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CollectionUtilsback to summary
public CollectionUtils()

Method Detail

toCollectionback to summary
public static <T extends B, B, C extends Collection<T>> C toCollection(Collection<B> v)

Casts the given collection to the requested type.

Parameters
<T>
the type of elements in this output collection
<B>
the type of elements in this input collection
<C>
the output collection type
v:Collection<B>

the input collection. Null is permitted.

Returns:C

the input collection cast to the requested type

Annotations
@SuppressWarnings:unchecked
toCollectionUBWback to summary
public static <T extends B, B, C extends Collection<T>> C toCollectionUBW(Collection<? extends B> v)

Casts the given collection to the requested upper bounded wildcard (UBW) type.

Parameters
<T>
the type of elements in this output collection
<B>
the upper bound type of elements in this input collection
<C>
the output collection type
v:Collection<? extends B>

the input collection. Null is permitted.

Returns:C

the input collection cast to the requested type

Annotations
@SuppressWarnings:unchecked