public static interface IndirectCollectionsFactory.IndirectCollectionsProvider
IndirectCollection implementations must conform to.| Modifier and Type | Method and Description |
|---|---|
<E> IndirectList<E> |
createIndirectList(java.util.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. |
<E> IndirectList<E> |
createIndirectList(int initialCapacity,
int capacityIncrement)
Construct an empty
IndirectList with the specified initial capacity
and capacity increment. |
<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. |
<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. |
<E> IndirectSet<E> |
createIndirectSet(java.util.Collection<? extends E> collection)
Constructs an
IndirectSet containing the elements of the specified
collection. |
<E> IndirectSet<E> |
createIndirectSet(int initialCapacity,
float loadFactor)
Construct an empty
IndirectSet with the specified initial capacity
and the specified load factor. |
java.lang.Class |
getListClass()
Class implementing
IndirectList. |
java.lang.Class |
getMapClass()
Class implementing
IndirectMap. |
java.lang.Class |
getSetClass()
Class implementing
IndirectSet. |
java.lang.Class getListClass()
IndirectList.IndirectList<E> IndirectList<E> createIndirectList(int initialCapacity, int capacityIncrement)
IndirectList with the specified initial capacity
and capacity increment.E - the class of the objects in the listinitialCapacity - the initial capacity of the listcapacityIncrement - the amount by which the capacity is increased
when the list overflowsIndirectList with the specified initial capacity
and capacity incrementjava.lang.IllegalArgumentException - if the specified initial capacity is negative<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 withIndirectList containing the elements of the specified collectionjava.lang.NullPointerException - if the specified collection is nulljava.lang.Class getSetClass()
IndirectSet.IndirectSet<E> IndirectSet<E> createIndirectSet(int initialCapacity, float loadFactor)
IndirectSet with the specified initial capacity
and the specified load factor.initialCapacity - the initial capacity of the setloadFactor - the load factor of the setIndirectSet with the specified initial capacity
and the specified load factorjava.lang.IllegalArgumentException - if the specified initial capacity is negative<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 nulljava.lang.Class getMapClass()
IndirectMap.IndirectMap<K,V> IndirectMap<K,V> createIndirectMap(int initialCapacity, float loadFactor)
IndirectMap with the specified initial
capacity and the specified load factor.initialCapacity - the initial capacity of the IndirectMaploadFactor - a number between 0.0 and 1.0IndirectMap with the specified initial
capacity and the specified load factorjava.lang.IllegalArgumentException - if the initial capacity is less than
or equal to zero, or if the load factor is less than or equal to zero<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 IndirectMapIndirectMap with the same mappings as the given Mapjava.lang.NullPointerException - if the specified map is null