Package ai.djl.nn
Class BlockList
Represents a set of names and Blocks.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an emptyBlockList.BlockList(int initialCapacity) Constructs an emptyBlockListwith the specified initial capacity.Constructs aBlockListcontaining the elements of the specified list of Pairs.Constructs aBlockListcontaining the elements of the specified keys and values.Constructs aBlockListcontaining the elements of the specified map. -
Method Summary
Methods inherited from class ai.djl.util.PairList
add, add, add, addAll, clear, contains, equals, get, get, hashCode, indexOf, isEmpty, iterator, keyArray, keyAt, keys, remove, remove, size, stream, subList, subList, toMap, toMap, unique, valueArray, valueAt, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BlockList
public BlockList()Creates an emptyBlockList. -
BlockList
public BlockList(int initialCapacity) Constructs an emptyBlockListwith the specified initial capacity.- Parameters:
initialCapacity- the initial capacity of the list- Throws:
IllegalArgumentException- if the specified initial capacity is negative
-
BlockList
Constructs aBlockListcontaining the elements of the specified keys and values.- Parameters:
keys- the key list containing the elements to be placed into thisBlockListvalues- the value list containing the elements to be placed into thisBlockList- Throws:
IllegalArgumentException- if the keys and values size are different
-
BlockList
Constructs aBlockListcontaining the elements of the specified list of Pairs.- Parameters:
list- the list containing the elements to be placed into thisBlockList
-
BlockList
Constructs aBlockListcontaining the elements of the specified map.- Parameters:
map- the map containing keys and values
-