-
- All Implemented Interfaces:
-
dev.thecodewarrior.prism.TypeReader,java.lang.AutoCloseable
public interface ListReader<T extends Object, S extends Serializer<?>> implements TypeReader<List<T>>
-
-
Method Summary
Modifier and Type Method Description abstract Unitreserve(Integer length)Ensures the buffer can contain at least length elements, potentially increasing efficiency. abstract UnitpadToLength(Integer length)Pads the buffer with nulls up until length elements, efficiently ensuring the length ahead of time. abstract Unitset(Integer index, T value)Directly sets the value in the buffer. abstract Unitadd(T value)Add a value to the buffer abstract SgetSerializer()The array element serializer -
-
Method Detail
-
reserve
abstract Unit reserve(Integer length)
Ensures the buffer can contain at least length elements, potentially increasing efficiency. This can be used in cases where the element count is known before deserializing.
-
padToLength
abstract Unit padToLength(Integer length)
-
set
abstract Unit set(Integer index, T value)
Directly sets the value in the buffer. This must be used in combination with padToLength to ensure the list's length is sufficient.
-
getSerializer
abstract S getSerializer()
The array element serializer
-
-
-
-