Package com.kuzudb
Class KuzuList
java.lang.Object
com.kuzudb.KuzuList
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this object, relinquishing the underlying valuegetListElement(long index) Get the element at the given index from the given list.longGet the size of the list.getValue()Value[]toArray()Gets the elements the list as a Java array.
-
Constructor Details
-
KuzuList
Construct a list from a value- Parameters:
value- the value to construct the list from
-
KuzuList
Construct a list literal from an array of values- Parameters:
values- : the array to construct the list from
-
KuzuList
Construct a list of a specific size populated with the default element- Parameters:
numElements- : the size of the list to construct
-
-
Method Details
-
getValue
- Returns:
- Gets the underlying Value for the list
-
getListSize
public long getListSize()Get the size of the list.- Returns:
- The size of the list.
- Throws:
RuntimeException- If the list has been destroyed.
-
getListElement
Get the element at the given index from the given list.- Parameters:
index- : The index of the element.- Returns:
- The element at the given index from the given list.
- Throws:
RuntimeException- If the list has been destroyed.
-
toArray
Gets the elements the list as a Java array. This will be truncated if the size of the list doesn't fit in a 32-bit integer.- Returns:
- the list as a Java array
- Throws:
RuntimeException
-
close
public void close()Closes this object, relinquishing the underlying value- Specified by:
closein interfaceAutoCloseable- Throws:
RuntimeException
-