public final class IndirectCollectionsFactory
extends java.lang.Object
IndirectCollection
.IndirectCollection
,
IndirectList
,
IndirectMap
,
IndirectSet
Modifier and Type | Class and Description |
---|---|
static interface |
IndirectCollectionsFactory.IndirectCollectionsProvider
Define API providers of
IndirectCollection implementations must conform to. |
Modifier and Type | Field and Description |
---|---|
static java.lang.Class |
IndirectList_Class
Class implementing
IndirectList . |
static java.lang.Class |
IndirectMap_Class
Class implementing
IndirectMap . |
static java.lang.Class |
IndirectSet_Class
Class implementing
IndirectSet . |
Constructor and Description |
---|
IndirectCollectionsFactory() |
Modifier and Type | Method and Description |
---|---|
static <E> IndirectList<E> |
createIndirectList()
Construct an empty
IndirectList with the default initial capacity (10)
and default capacity increment (0). |
static <E> IndirectList<E> |
createIndirectList(java.util.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. |
static <E> IndirectList<E> |
createIndirectList(int initialCapacity)
Construct an empty
IndirectList with the specified initial capacity
and default capacity increment (0). |
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). |
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). |
static <K,V> IndirectMap<K,V> |
createIndirectMap(java.util.Map<? extends K,? extends V> map)
Construct a new
IndirectMap with the same mappings as the given Map. |
static <E> IndirectSet<E> |
createIndirectSet()
Construct an empty
IndirectSet with the default initial capacity (10)
and the default load factor (0.75). |
static <E> IndirectSet<E> |
createIndirectSet(java.util.Collection<? extends E> collection)
Constructs an
IndirectSet containing the elements of the specified
collection. |
static <E> IndirectSet<E> |
createIndirectSet(int initialCapacity)
Construct an empty
IndirectSet with the specified initial capacity
and the default load factor (0.75). |
public static final java.lang.Class IndirectList_Class
IndirectList
.public static final java.lang.Class IndirectSet_Class
IndirectSet
.public static final java.lang.Class IndirectMap_Class
IndirectMap
.public static <E> IndirectList<E> createIndirectList()
IndirectList
with the default initial capacity (10)
and default capacity increment (0).E
- the class of the objects in the listIndirectList
with the default initial capacity
and default capacity incrementpublic static <E> IndirectList<E> createIndirectList(int initialCapacity)
IndirectList
with the specified initial capacity
and default capacity increment (0).E
- the class of the objects in the listinitialCapacity
- the initial capacity of the vectorIndirectList
with the specified initial capacity
and default capacity incrementjava.lang.IllegalArgumentException
- if the specified initial capacity
is negativepublic static <E> IndirectList<E> createIndirectList(java.util.Collection<? extends E> collection)
IndirectList
containing the elements of the specified
collection, in the order they are returned by the collection's iterator.E
- the class of the objects in the listcollection
- a collection containing the elements to construct
the IndirectList
with.IndirectList
containing the elements of the specified
collectionpublic static <E> IndirectSet<E> createIndirectSet()
IndirectSet
with the default initial capacity (10)
and the default load factor (0.75).IndirectSet
with the default initial capacity
and the default load factorpublic static <E> IndirectSet<E> createIndirectSet(int initialCapacity)
IndirectSet
with the specified initial capacity
and the default load factor (0.75).initialCapacity
- the initial capacity of the setIndirectSet
with the specified initial capacity
and the default load factorjava.lang.IllegalArgumentException
- if the specified initial capacity is negativepublic static <E> IndirectSet<E> createIndirectSet(java.util.Collection<? extends E> collection)
IndirectSet
containing the elements of the specified
collection.collection
- a collection containing the elements to construct
the IndirectSet
withIndirectSet
containing the elements of the specified collectionjava.lang.NullPointerException
- if the specified collection is nullpublic static <K,V> IndirectMap<K,V> createIndirectMap()
IndirectMap
with the default initial
capacity (11) and the default load factor (0.75).IndirectMap
with the default initial
capacity and the default load factorpublic static <K,V> IndirectMap<K,V> createIndirectMap(int initialCapacity)
IndirectMap
with the specified initial
capacity and the default load factor (0.75).initialCapacity
- the initial capacity of the IndirectMap
IndirectMap
with the specified initial
capacity and the default load factorjava.lang.IllegalArgumentException
- if the initial capacity is less than
or equal to zeropublic static <K,V> IndirectMap<K,V> createIndirectMap(java.util.Map<? extends K,? extends V> map)
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.map
- the map whose mappings are to be placed into created IndirectMap
IndirectMap
with the same mappings as the given Mapjava.lang.NullPointerException
- if the specified map is null