Interface IndirectCollectionsFactory.IndirectCollectionsProvider

    • Method Detail

      • getListClass

        java.lang.Class getListClass()
        Class implementing IndirectList.
        Returns:
        class implementing IndirectList
      • createIndirectList

        <E> IndirectList<E> createIndirectList​(int initialCapacity,
                                               int capacityIncrement)
        Construct an empty IndirectList with the specified initial capacity and capacity increment.
        Type Parameters:
        E - the class of the objects in the list
        Parameters:
        initialCapacity - the initial capacity of the list
        capacityIncrement - the amount by which the capacity is increased when the list overflows
        Returns:
        an empty IndirectList with the specified initial capacity and capacity increment
        Throws:
        java.lang.IllegalArgumentException - if the specified initial capacity is negative
      • createIndirectList

        <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.
        Type Parameters:
        E - the class of the objects in the list
        Parameters:
        collection - a collection containing the elements to construct the IndirectList with
        Returns:
        an IndirectList containing the elements of the specified collection
        Throws:
        java.lang.NullPointerException - if the specified collection is null
      • getSetClass

        java.lang.Class getSetClass()
        Class implementing IndirectSet.
        Returns:
        class implementing IndirectSet
      • createIndirectSet

        <E> IndirectSet<E> createIndirectSet​(int initialCapacity,
                                             float loadFactor)
        Construct an empty IndirectSet with the specified initial capacity and the specified load factor.
        Parameters:
        initialCapacity - the initial capacity of the set
        loadFactor - the load factor of the set
        Returns:
        an empty IndirectSet with the specified initial capacity and the specified load factor
        Throws:
        java.lang.IllegalArgumentException - if the specified initial capacity is negative
      • createIndirectSet

        <E> IndirectSet<E> createIndirectSet​(java.util.Collection<? extends E> collection)
        Constructs an IndirectSet containing the elements of the specified collection.
        Parameters:
        collection - a collection containing the elements to construct the IndirectSet with
        Returns:
        an IndirectSet containing the elements of the specified collection
        Throws:
        java.lang.NullPointerException - if the specified collection is null
      • getMapClass

        java.lang.Class getMapClass()
        Class implementing IndirectMap.
        Returns:
        class implementing IndirectMap
      • createIndirectMap

        <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 - the initial capacity of the IndirectMap
        loadFactor - a number between 0.0 and 1.0
        Returns:
        a new, empty IndirectMap with the specified initial capacity and the specified load factor
        Throws:
        java.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
      • createIndirectMap

        <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. 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 - the map whose mappings are to be placed into created IndirectMap
        Returns:
        a new IndirectMap with the same mappings as the given Map
        Throws:
        java.lang.NullPointerException - if the specified map is null