Package com.clickhouse.data
Interface ClickHouseArraySequence
- All Superinterfaces:
ClickHouseValue,Serializable
- All Known Implementing Classes:
ClickHouseArrayValue
This interface represents a generic array value.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClickHouseArraySequenceallocate(int length) Allocates an array according to given length.default ClickHouseArraySequenceAllocates an array according to given arguments.Allocates an array according to given arguments.default ClickHouseArraySequencecopy()Gets a shallow copy of this value object.copy(boolean deep) Gets a copy of this value object.<V extends ClickHouseValue>
VgetValue(int index, V value) Gets value at the specified position in this array.intlength()Gets length of this array.setValue(int index, ClickHouseValue value) Sets value to the specified position in this array.Methods inherited from interface com.clickhouse.data.ClickHouseValue
asArray, asArray, asBigDecimal, asBigDecimal, asBigInteger, asBinary, asBinary, asBinary, asBinary, asBoolean, asByte, asByteStream, asCharacter, asCharacterStream, asDate, asDateTime, asDateTime, asDouble, asEnum, asFloat, asInet4Address, asInet6Address, asInstant, asInstant, asInteger, asLong, asMap, asMap, asObject, asObject, asOffsetDateTime, asOffsetDateTime, asRawObject, asShort, asString, asTime, asTime, asTuple, asUuid, asZonedDateTime, asZonedDateTime, isInfinity, isNaN, isNullable, isNullOrEmpty, newUnsupportedException, resetToDefault, resetToNullOrEmpty, toSqlExpression, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, updateUnknown
-
Method Details
-
allocate
Allocates an array according to given length. Same asallocate(length, Object.class, 1).- Parameters:
length- length of the array- Returns:
- this value
-
allocate
Allocates an array according to given arguments. Same asallocate(length, clazz, 1).- Parameters:
length- length of the arrayclazz- optional value type, null meansObject.class- Returns:
- this value
-
allocate
Allocates an array according to given arguments. Pay attention that this will will not create new array but reuse existing one, whenlengthareclazznot changed.- Parameters:
length- length of the arrayclazz- optional value type, null meansObject.classlevel- level of the array, zero or negative number is treated as1- Returns:
- this value
-
length
int length()Gets length of this array.- Returns:
- length of this array
-
getValue
Gets value at the specified position in this array.- Type Parameters:
V- type of the value- Parameters:
index- index which is greater than or equal to zero and it's always smaller thanlength()value- non-null template object to retrieve the value- Returns:
- non-null value which is same as
value
-
setValue
Sets value to the specified position in this array.- Parameters:
index- index which is greater than or equal to zero and it's always smaller thanlength()value- non-null container of the value- Returns:
- this value
-
copy
Description copied from interface:ClickHouseValueGets a shallow copy of this value object. Same ascopy(false).- Specified by:
copyin interfaceClickHouseValue- Returns:
- shallow copy of this value object
-
copy
Description copied from interface:ClickHouseValueGets a copy of this value object.- Specified by:
copyin interfaceClickHouseValue- Parameters:
deep- true to create a deep copy; false for a shallow copy- Returns:
- copy of this value object
-