Package convex.core.data
Class VectorBuilder<T extends ACell>
java.lang.Object
convex.core.data.VectorBuilder<T>
- Type Parameters:
T
- Type of Vector elements
Similar to Java StringBuilder designed for concatenating multiple small Vectors to produce a larger
Vector.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
acc
Accumulator Vector, always a canonical Vector with filled chunks -
tail
Accumulator array for up to a single chunk worth of cells -
count
protected long countTotal count of elements in this VectorBuilder
-
-
Constructor Details
-
VectorBuilder
public VectorBuilder() -
VectorBuilder
-
-
Method Details
-
append
-
concat
-
conj
-
toVector
-
count
public long count() -
check
public boolean check(long limit) Checks if this VectorBuilder count is less than or equal to the specified limit- Parameters:
limit
- Maximum allowable length of VectorBuilder- Returns:
- true if within limit, false if exceeded
-
clear
public void clear()Clears this VectorBuilder, preparing for new appends to an empty Blob
-