Package io.karatelabs.match
Interface LargeValueStore
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
DiskBackedList
Interface for handling large collections that may need to be stored
on disk to avoid memory exhaustion.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this store and releases any associated resources (e.g., temp files).get(int index) Returns the element at the specified index.iterator()Returns an iterator over the elements in this store.intsize()Returns the number of elements in this store.
-
Method Details
-
size
int size()Returns the number of elements in this store. -
get
Returns the element at the specified index.- Parameters:
index- the index of the element to return- Returns:
- the element at the specified position
- Throws:
IndexOutOfBoundsException- if index is out of range
-
iterator
Returns an iterator over the elements in this store. -
close
void close()Closes this store and releases any associated resources (e.g., temp files).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-