Package org.nd4j.common.collection
Class CompactHeapStringList
- java.lang.Object
-
- org.nd4j.common.collection.CompactHeapStringList
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_INTEGER_REALLOCATION_BLOCK_SIZE_BYTESstatic intDEFAULT_REALLOCATION_BLOCK_SIZE_BYTES
-
Constructor Summary
Constructors Constructor Description CompactHeapStringList()CompactHeapStringList(int reallocationBlockSizeBytes, int intReallocationBlockSizeBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, String element)booleanadd(String s)booleanaddAll(int index, Collection<? extends String> c)booleanaddAll(Collection<? extends String> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)Stringget(int index)intindexOf(Object o)booleanisEmpty()Iterator<String>iterator()intlastIndexOf(Object o)ListIterator<String>listIterator()ListIterator<String>listIterator(int index)Stringremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)Stringset(int index, String element)intsize()List<String>subList(int fromIndex, int toIndex)String[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
hashCode, replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
DEFAULT_REALLOCATION_BLOCK_SIZE_BYTES
public static final int DEFAULT_REALLOCATION_BLOCK_SIZE_BYTES
- See Also:
- Constant Field Values
-
DEFAULT_INTEGER_REALLOCATION_BLOCK_SIZE_BYTES
public static final int DEFAULT_INTEGER_REALLOCATION_BLOCK_SIZE_BYTES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CompactHeapStringList
public CompactHeapStringList()
-
CompactHeapStringList
public CompactHeapStringList(int reallocationBlockSizeBytes, int intReallocationBlockSizeBytes)- Parameters:
reallocationBlockSizeBytes- Number of bytes by which to increase the char[], when allocating a new storage arrayintReallocationBlockSizeBytes- Number of bytes by which to increase the int[], when allocating a new storage array
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public String[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(String s)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<String>- Specified by:
containsAllin interfaceList<String>
-
addAll
public boolean addAll(Collection<? extends String> c)
-
addAll
public boolean addAll(int index, Collection<? extends String> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
clear
public void clear()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<String>
-
listIterator
public ListIterator<String> listIterator()
- Specified by:
listIteratorin interfaceList<String>
-
listIterator
public ListIterator<String> listIterator(int index)
- Specified by:
listIteratorin interfaceList<String>
-
-