Top Description Inners Fields Constructors Methods
org.eclipse.persistence.indirection

public final Class IndirectCollectionsFactory

extends Object
Class Inheritance
Imports
java.util.Collection, .Map

Provides factory methods to create JDK specific implementation of particular type of IndirectCollection.
Author
Lukas Jungmann
Since
EclipseLink 2.6.0
See Also
IndirectCollection, IndirectList, IndirectMap, IndirectSet

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
IndirectCollectionsFactory.DefaultProvider

Provider for creating Java SE 7 (and older) compatible IndirectCollection implementations.

public static interface
IndirectCollectionsFactory.IndirectCollectionsProvider

Define API providers of IndirectCollection implementations must conform to.

Field Summary

Modifier and TypeField and Description
public static final Class<?>
IndirectList_Class

Class implementing IndirectList.

public static final Class<?>
IndirectMap_Class

Class implementing IndirectMap.

public static final Class<?>
IndirectSet_Class

Class implementing IndirectSet.

private static final IndirectCollectionsFactory.IndirectCollectionsProvider

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
the class of the objects in the list
E
>
IndirectList<E>

Returns:

an empty IndirectList with the default initial capacity and default capacity increment
createIndirectList
()

Construct an empty IndirectList with the default initial capacity (10) and default capacity increment (0).

public static <
the class of the objects in the list
E
>
IndirectList<E>

Returns:

an empty IndirectList with the specified initial capacity and default capacity increment
createIndirectList
(int
the initial capacity of the vector
initialCapacity
)

Construct an empty IndirectList with the specified initial capacity and default capacity increment (0).

public static <
the class of the objects in the list
E
>
IndirectList<E>

Returns:

an IndirectList containing the elements of the specified collection
createIndirectList
(Collection<? extends E>
a collection containing the elements to construct the IndirectList with.
collection
)

Construct an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.

public static <K, V> IndirectMap<K, V>

Returns:

a new, empty IndirectMap with the default initial capacity and the default load factor
createIndirectMap
()

Construct a new, empty IndirectMap with the default initial capacity (11) and the default load factor (0.75).

public static <K, V> IndirectMap<K, V>

Returns:

a new, empty IndirectMap with the specified initial capacity and the default load factor
createIndirectMap
(int
the initial capacity of the IndirectMap
initialCapacity
)

Construct a new, empty IndirectMap with the specified initial capacity and the default load factor (0.75).

public static <K, V> IndirectMap<K, V>

Returns:

a new IndirectMap with the same mappings as the given Map
createIndirectMap
(Map<? extends K, ? extends V>
the map whose mappings are to be placed into created IndirectMap
map
)

Construct a new IndirectMap with the same mappings as the given Map.

public static <E> IndirectSet<E>

Returns:

an empty IndirectSet with the default initial capacity and the default load factor
createIndirectSet
()

Construct an empty IndirectSet with the default initial capacity (10) and the default load factor (0.75).

public static <E> IndirectSet<E>

Returns:

an empty IndirectSet with the specified initial capacity and the default load factor
createIndirectSet
(int
the initial capacity of the set
initialCapacity
)

Construct an empty IndirectSet with the specified initial capacity and the default load factor (0.75).

public static <E> IndirectSet<E>

Returns:

an IndirectSet containing the elements of the specified collection
createIndirectSet
(Collection<? extends E>
a collection containing the elements to construct the IndirectSet with
collection
)

Constructs an IndirectSet containing the elements of the specified collection.

private static IndirectCollectionsFactory.IndirectCollectionsProvider

Returns:

default provider responsible for creating Java SE specific implementations of IndirectCollections
getProvider
()

As of EclipseLink 2.6.0 this returns Java SE 7- compatible provider by default on Java SE 7 and Java SE 8+ compatible provider if Java SE 8+ is detected.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

IndirectList_Classback to summary
public static final Class<?> IndirectList_Class

Class implementing IndirectList.

IndirectMap_Classback to summary
public static final Class<?> IndirectMap_Class

Class implementing IndirectMap.

IndirectSet_Classback to summary
public static final Class<?> IndirectSet_Class

Class implementing IndirectSet.

providerback to summary
private static final IndirectCollectionsFactory.IndirectCollectionsProvider provider

Constructor Detail

IndirectCollectionsFactoryback to summary
private IndirectCollectionsFactory()

Method Detail

createIndirectListback to summary
public static <E> IndirectList<E> createIndirectList()

Construct an empty IndirectList with the default initial capacity (10) and default capacity increment (0).

Parameters
<E>
the class of the objects in the list
Returns:IndirectList<E>

an empty IndirectList with the default initial capacity and default capacity increment

createIndirectListback to summary
public static <E> IndirectList<E> createIndirectList(int initialCapacity)

Construct an empty IndirectList with the specified initial capacity and default capacity increment (0).

Parameters
<E>
the class of the objects in the list
initialCapacity:int

the initial capacity of the vector

Returns:IndirectList<E>

an empty IndirectList with the specified initial capacity and default capacity increment

Exceptions
IllegalArgumentException:
if the specified initial capacity is negative
createIndirectListback to summary
public static <E> IndirectList<E> createIndirectList(Collection<? extends E> collection)

Construct an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.

Parameters
<E>
the class of the objects in the list
collection:Collection<? extends E>

a collection containing the elements to construct the IndirectList with.

Returns:IndirectList<E>

an IndirectList containing the elements of the specified collection

createIndirectMapback to summary
public static <K, V> IndirectMap<K, V> createIndirectMap()

Construct a new, empty IndirectMap with the default initial capacity (11) and the default load factor (0.75).

Returns:IndirectMap<K, V>

a new, empty IndirectMap with the default initial capacity and the default load factor

createIndirectMapback to summary
public static <K, V> IndirectMap<K, V> createIndirectMap(int initialCapacity)

Construct a new, empty IndirectMap with the specified initial capacity and the default load factor (0.75).

Parameters
initialCapacity:int

the initial capacity of the IndirectMap

Returns:IndirectMap<K, V>

a new, empty IndirectMap with the specified initial capacity and the default load factor

Exceptions
IllegalArgumentException:
if the initial capacity is less than or equal to zero
createIndirectMapback to summary
public static <K, V> IndirectMap<K, V> createIndirectMap(Map<? extends K, ? extends V> map)

Construct a new IndirectMap with the same mappings as the given Map. The IndirectMap is created with a capacity of twice the number of entries in the given Map or 11 (whichever is greater), and a default load factor, which is 0.75.

Parameters
map:Map<? extends K, ? extends V>

the map whose mappings are to be placed into created IndirectMap

Returns:IndirectMap<K, V>

a new IndirectMap with the same mappings as the given Map

Exceptions
NullPointerException:
if the specified map is null
createIndirectSetback to summary
public static <E> IndirectSet<E> createIndirectSet()

Construct an empty IndirectSet with the default initial capacity (10) and the default load factor (0.75).

Returns:IndirectSet<E>

an empty IndirectSet with the default initial capacity and the default load factor

createIndirectSetback to summary
public static <E> IndirectSet<E> createIndirectSet(int initialCapacity)

Construct an empty IndirectSet with the specified initial capacity and the default load factor (0.75).

Parameters
initialCapacity:int

the initial capacity of the set

Returns:IndirectSet<E>

an empty IndirectSet with the specified initial capacity and the default load factor

Exceptions
IllegalArgumentException:
if the specified initial capacity is negative
createIndirectSetback to summary
public static <E> IndirectSet<E> createIndirectSet(Collection<? extends E> collection)

Constructs an IndirectSet containing the elements of the specified collection.

Parameters
collection:Collection<? extends E>

a collection containing the elements to construct the IndirectSet with

Returns:IndirectSet<E>

an IndirectSet containing the elements of the specified collection

Exceptions
NullPointerException:
if the specified collection is null
getProviderback to summary
private static IndirectCollectionsFactory.IndirectCollectionsProvider getProvider()

As of EclipseLink 2.6.0 this returns Java SE 7- compatible provider by default on Java SE 7 and Java SE 8+ compatible provider if Java SE 8+ is detected.

Returns:IndirectCollectionsFactory.IndirectCollectionsProvider

default provider responsible for creating Java SE specific implementations of IndirectCollections

org.eclipse.persistence.indirection back to summary

private final Class IndirectCollectionsFactory.DefaultProvider

extends Object
implements IndirectCollectionsProvider
Class Inheritance
  • java.lang.Object
  • org.eclipse.persistence.indirection.IndirectCollectionsFactory.DefaultProvider
All Implemented Interfaces
org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider

Provider for creating Java SE 7 (and older) compatible IndirectCollection implementations.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public <E> IndirectList<E>
createIndirectList(int
the initial capacity of the list
initialCapacity
,
int
the amount by which the capacity is increased when the list overflows
capacityIncrement
)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectList.

Construct an empty IndirectList with the specified initial capacity and capacity increment.
public <E> IndirectList<E>
createIndirectList(Collection<? extends E>
a collection containing the elements to construct the IndirectList with
collection
)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectList.

Constructs an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.
public <K, V> IndirectMap<K, V>
createIndirectMap(int
the initial capacity of the IndirectMap
initialCapacity
,
float
a number between 0.0 and 1.0
loadFactor
)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectMap.

Construct a new, empty IndirectMap with the specified initial capacity and the specified load factor.
public <K, V> IndirectMap<K, V>
createIndirectMap(Map<? extends K, ? extends V>
the map whose mappings are to be placed into created IndirectMap
map
)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectMap.

Construct a new IndirectMap with the same mappings as the given Map.
public <E> IndirectSet<E>
createIndirectSet(int
the initial capacity of the set
initialCapacity
,
float
the load factor of the set
loadFactor
)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectSet.

Construct an empty IndirectSet with the specified initial capacity and the specified load factor.
public <E> IndirectSet<E>
createIndirectSet(Collection<? extends E>
a collection containing the elements to construct the IndirectSet with
collection
)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectSet.

Constructs an IndirectSet containing the elements of the specified collection.
public Class<?>
public Class<?>
public Class<?>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DefaultProviderback to summary
private DefaultProvider()

Method Detail

createIndirectListback to summary
public <E> IndirectList<E> createIndirectList(int initialCapacity, int capacityIncrement)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectList.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectList.

Construct an empty IndirectList with the specified initial capacity and capacity increment.

Parameters
<E>
the class of the objects in the list
initialCapacity:int

the initial capacity of the list

capacityIncrement:int

the amount by which the capacity is increased when the list overflows

Returns:IndirectList<E>

an empty IndirectList with the specified initial capacity and capacity increment

Annotations
@Override
createIndirectListback to summary
public <E> IndirectList<E> createIndirectList(Collection<? extends E> collection)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectList.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectList.

Constructs an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.

Parameters
<E>
the class of the objects in the list
collection:Collection<? extends E>

a collection containing the elements to construct the IndirectList with

Returns:IndirectList<E>

an IndirectList containing the elements of the specified collection

Annotations
@Override
createIndirectMapback to summary
public <K, V> IndirectMap<K, V> createIndirectMap(int initialCapacity, float loadFactor)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectMap.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectMap.

Construct a new, empty IndirectMap with the specified initial capacity and the specified load factor.

Parameters
initialCapacity:int

the initial capacity of the IndirectMap

loadFactor:float

a number between 0.0 and 1.0

Returns:IndirectMap<K, V>

a new, empty IndirectMap with the specified initial capacity and the specified load factor

Annotations
@Override
createIndirectMapback to summary
public <K, V> IndirectMap<K, V> createIndirectMap(Map<? extends K, ? extends V> map)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectMap.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectMap.

Construct a new IndirectMap with the same mappings as the given Map. The IndirectMap is created with a capacity of twice the number of entries in the given Map or 11 (whichever is greater), and a default load factor, which is 0.75.

Parameters
map:Map<? extends K, ? extends V>

the map whose mappings are to be placed into created IndirectMap

Returns:IndirectMap<K, V>

a new IndirectMap with the same mappings as the given Map

Annotations
@Override
createIndirectSetback to summary
public <E> IndirectSet<E> createIndirectSet(int initialCapacity, float loadFactor)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectSet.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectSet.

Construct an empty IndirectSet with the specified initial capacity and the specified load factor.

Parameters
initialCapacity:int

the initial capacity of the set

loadFactor:float

the load factor of the set

Returns:IndirectSet<E>

an empty IndirectSet with the specified initial capacity and the specified load factor

Annotations
@Override
createIndirectSetback to summary
public <E> IndirectSet<E> createIndirectSet(Collection<? extends E> collection)

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectSet.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.createIndirectSet.

Constructs an IndirectSet containing the elements of the specified collection.

Parameters
collection:Collection<? extends E>

a collection containing the elements to construct the IndirectSet with

Returns:IndirectSet<E>

an IndirectSet containing the elements of the specified collection

Annotations
@Override
getListClassback to summary
public Class<?> getListClass()

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.getListClass.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.getListClass.

Class implementing IndirectList.

Returns:Class<?>

class implementing IndirectList

Annotations
@Override
getMapClassback to summary
public Class<?> getMapClass()

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.getMapClass.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.getMapClass.

Class implementing IndirectMap.

Returns:Class<?>

class implementing IndirectMap

Annotations
@Override
getSetClassback to summary
public Class<?> getSetClass()

Implements org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.getSetClass.

Doc from org.eclipse.persistence.indirection.IndirectCollectionsFactory.IndirectCollectionsProvider.getSetClass.

Class implementing IndirectSet.

Returns:Class<?>

class implementing IndirectSet

Annotations
@Override
org.eclipse.persistence.indirection back to summary

public Interface IndirectCollectionsFactory.IndirectCollectionsProvider

Known Direct Implementers
org.eclipse.persistence.indirection.IndirectCollectionsFactory.DefaultProvider

Define API providers of IndirectCollection implementations must conform to.

Method Summary

Modifier and TypeMethod and Description
public <
the class of the objects in the list
E
>
IndirectList<E>

Returns:

an empty IndirectList with the specified initial capacity and capacity increment
createIndirectList
(int
the initial capacity of the list
initialCapacity
,
int
the amount by which the capacity is increased when the list overflows
capacityIncrement
)

Construct an empty IndirectList with the specified initial capacity and capacity increment.

public <
the class of the objects in the list
E
>
IndirectList<E>

Returns:

an IndirectList containing the elements of the specified collection
createIndirectList
(Collection<? extends E>
a collection containing the elements to construct the IndirectList with
collection
)

Constructs an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.

public <K, V> IndirectMap<K, V>

Returns:

a new, empty IndirectMap with the specified initial capacity and the specified load factor
createIndirectMap
(int
the initial capacity of the IndirectMap
initialCapacity
,
float
a number between 0.0 and 1.0
loadFactor
)

Construct a new, empty IndirectMap with the specified initial capacity and the specified load factor.

public <K, V> IndirectMap<K, V>

Returns:

a new IndirectMap with the same mappings as the given Map
createIndirectMap
(Map<? extends K, ? extends V>
the map whose mappings are to be placed into created IndirectMap
map
)

Construct a new IndirectMap with the same mappings as the given Map.

public <E> IndirectSet<E>

Returns:

an empty IndirectSet with the specified initial capacity and the specified load factor
createIndirectSet
(int
the initial capacity of the set
initialCapacity
,
float
the load factor of the set
loadFactor
)

Construct an empty IndirectSet with the specified initial capacity and the specified load factor.

public <E> IndirectSet<E>

Returns:

an IndirectSet containing the elements of the specified collection
createIndirectSet
(Collection<? extends E>
a collection containing the elements to construct the IndirectSet with
collection
)

Constructs an IndirectSet containing the elements of the specified collection.

public Class<?>

Returns:

class implementing IndirectList
getListClass
()

Class implementing IndirectList.

public Class<?>

Returns:

class implementing IndirectMap
getMapClass
()

Class implementing IndirectMap.

public Class<?>

Returns:

class implementing IndirectSet
getSetClass
()

Class implementing IndirectSet.

Method Detail

createIndirectListback to summary
public <E> IndirectList<E> createIndirectList(int initialCapacity, int capacityIncrement)

Construct an empty IndirectList with the specified initial capacity and capacity increment.

Parameters
<E>
the class of the objects in the list
initialCapacity:int

the initial capacity of the list

capacityIncrement:int

the amount by which the capacity is increased when the list overflows

Returns:IndirectList<E>

an empty IndirectList with the specified initial capacity and capacity increment

Exceptions
IllegalArgumentException:
if the specified initial capacity is negative
createIndirectListback to summary
public <E> IndirectList<E> createIndirectList(Collection<? extends E> collection)

Constructs an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.

Parameters
<E>
the class of the objects in the list
collection:Collection<? extends E>

a collection containing the elements to construct the IndirectList with

Returns:IndirectList<E>

an IndirectList containing the elements of the specified collection

Exceptions
NullPointerException:
if the specified collection is null
createIndirectMapback to summary
public <K, V> IndirectMap<K, V> createIndirectMap(int initialCapacity, float loadFactor)

Construct a new, empty IndirectMap with the specified initial capacity and the specified load factor.

Parameters
initialCapacity:int

the initial capacity of the IndirectMap

loadFactor:float

a number between 0.0 and 1.0

Returns:IndirectMap<K, V>

a new, empty IndirectMap with the specified initial capacity and the specified load factor

Exceptions
IllegalArgumentException:
if the initial capacity is less than or equal to zero, or if the load factor is less than or equal to zero
createIndirectMapback to summary
public <K, V> IndirectMap<K, V> createIndirectMap(Map<? extends K, ? extends V> map)

Construct a new IndirectMap with the same mappings as the given Map. The IndirectMap is created with a capacity of twice the number of entries in the given Map or 11 (whichever is greater), and a default load factor, which is 0.75.

Parameters
map:Map<? extends K, ? extends V>

the map whose mappings are to be placed into created IndirectMap

Returns:IndirectMap<K, V>

a new IndirectMap with the same mappings as the given Map

Exceptions
NullPointerException:
if the specified map is null
createIndirectSetback to summary
public <E> IndirectSet<E> createIndirectSet(int initialCapacity, float loadFactor)

Construct an empty IndirectSet with the specified initial capacity and the specified load factor.

Parameters
initialCapacity:int

the initial capacity of the set

loadFactor:float

the load factor of the set

Returns:IndirectSet<E>

an empty IndirectSet with the specified initial capacity and the specified load factor

Exceptions
IllegalArgumentException:
if the specified initial capacity is negative
createIndirectSetback to summary
public <E> IndirectSet<E> createIndirectSet(Collection<? extends E> collection)

Constructs an IndirectSet containing the elements of the specified collection.

Parameters
collection:Collection<? extends E>

a collection containing the elements to construct the IndirectSet with

Returns:IndirectSet<E>

an IndirectSet containing the elements of the specified collection

Exceptions
NullPointerException:
if the specified collection is null
getListClassback to summary
public Class<?> getListClass()

Class implementing IndirectList.

Returns:Class<?>

class implementing IndirectList

getMapClassback to summary
public Class<?> getMapClass()

Class implementing IndirectMap.

Returns:Class<?>

class implementing IndirectMap

getSetClassback to summary
public Class<?> getSetClass()

Class implementing IndirectSet.

Returns:Class<?>

class implementing IndirectSet