@Namespace(value="arrow") @NoOffset @Properties(inherit=arrow.class) public class BasicDecimal128 extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
static int |
kBitWidth |
static int |
kMaxPrecision |
static int |
kMaxScale |
Constructor and Description |
---|
BasicDecimal128()
\brief Empty constructor creates a BasicDecimal128 with a value of 0.
|
BasicDecimal128(byte[] bytes) |
BasicDecimal128(ByteBuffer bytes) |
BasicDecimal128(BytePointer bytes)
\brief Create a BasicDecimal128 from an array of bytes.
|
BasicDecimal128(long size)
Native array allocator.
|
BasicDecimal128(Long2Array array)
\brief Create a BasicDecimal256 from the two's complement representation.
|
BasicDecimal128(long high,
long low)
\brief Create a BasicDecimal128 from the two's complement representation.
|
BasicDecimal128(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
BasicDecimal128 |
Abs()
\brief Absolute value (in-place)
|
static BasicDecimal128 |
Abs(BasicDecimal128 left)
\brief Absolute value
|
BasicDecimal128 |
addPut(BasicDecimal128 right)
\brief Add a number to this one.
|
BasicDecimal128 |
andPut(BasicDecimal128 right)
\brief Bitwise "and" between two BasicDecimal128.
|
int |
CountLeadingBinaryZeros()
\brief count the number of leading binary zeroes.
|
arrow.DecimalStatus |
Divide(BasicDecimal128 divisor,
BasicDecimal128 result,
BasicDecimal128 remainder)
Divide this number by right and return the result.
|
BasicDecimal128 |
dividePut(BasicDecimal128 right)
\brief In-place division.
|
boolean |
FitsInPrecision(int precision)
\brief Whether this number fits in the given precision
Return true if the number of significant digits is less or equal to
precision . |
static BasicDecimal128 |
GetHalfScaleMultiplier(int scale)
\brief Half-scale multiplier for given scale value.
|
static BasicDecimal128 |
GetMaxSentinel()
\brief Get the maximum decimal value (is not a valid value).
|
static BasicDecimal128 |
GetMaxValue()
\brief Get the maximum valid unscaled decimal value.
|
static BasicDecimal128 |
GetMinSentinel()
\brief Get the minimum decimal value (is not a valid value).
|
BasicDecimal128 |
getPointer(long i) |
static BasicDecimal128 |
GetScaleMultiplier(int scale)
\brief Scale multiplier for given scale value.
|
void |
GetWholeAndFraction(int scale,
BasicDecimal128 whole,
BasicDecimal128 fraction)
\brief separate the integer and fractional parts for the given scale.
|
long |
high_bits()
\brief Get the high bits of the two's complement representation of the number.
|
BasicDecimal128 |
IncreaseScaleBy(int increase_by)
\brief Scale up.
|
static int |
kBitWidth() |
static int |
kMaxPrecision() |
static int |
kMaxScale() |
Long2Array |
little_endian_array()
\brief Get the bits of the two's complement representation of the number.
|
long |
low_bits()
\brief Get the low bits of the two's complement representation of the number.
|
BasicDecimal128 |
multiplyPut(BasicDecimal128 right)
\brief Multiply this number by another number.
|
BytePointer |
mutable_native_endian_bytes() |
Long2Array |
native_endian_array()
\brief Get the bits of the two's complement representation of the number.
|
BytePointer |
native_endian_bytes() |
BasicDecimal128 |
Negate()
\brief Negate the current value (in-place)
|
BasicDecimal128 |
orPut(BasicDecimal128 right)
\brief Bitwise "or" between two BasicDecimal128.
|
BasicDecimal128 |
position(long position) |
BasicDecimal128 |
ReduceScaleBy(int reduce_by) |
BasicDecimal128 |
ReduceScaleBy(int reduce_by,
boolean round)
\brief Scale down.
|
arrow.DecimalStatus |
Rescale(int original_scale,
int new_scale,
BasicDecimal128 out)
\brief Convert BasicDecimal128 from one scale to another
|
BasicDecimal128 |
shiftLeftPut(int bits)
\brief Shift left by the given number of bits.
|
BasicDecimal128 |
shiftRightPut(int bits)
\brief Shift right by the given number of bits.
|
long |
Sign() |
BasicDecimal128 |
subtractPut(BasicDecimal128 right)
\brief Subtract a number from this one.
|
Byte16Array |
ToBytes()
\brief Return the raw bytes of the value in native-endian byte order.
|
void |
ToBytes(byte[] out) |
void |
ToBytes(ByteBuffer out) |
void |
ToBytes(BytePointer out) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public static final int kBitWidth
public static final int kMaxPrecision
public static final int kMaxScale
public BasicDecimal128(Pointer p)
Pointer(Pointer)
.public BasicDecimal128(long size)
Pointer.position(long)
.public BasicDecimal128(@Cast(value="int64_t") long high, @Cast(value="uint64_t") long low)
public BasicDecimal128(@Const @ByRef Long2Array array)
public BasicDecimal128()
public BasicDecimal128(@Cast(value="const uint8_t*") BytePointer bytes)
public BasicDecimal128(@Cast(value="const uint8_t*") ByteBuffer bytes)
public BasicDecimal128 position(long position)
public BasicDecimal128 getPointer(long i)
getPointer
in class Pointer
@MemberGetter public static int kBitWidth()
@MemberGetter public static int kMaxPrecision()
@MemberGetter public static int kMaxScale()
@ByRef public BasicDecimal128 Negate()
@ByRef public BasicDecimal128 Abs()
@ByVal public static BasicDecimal128 Abs(@Const @ByRef BasicDecimal128 left)
@ByRef @Name(value="operator +=") public BasicDecimal128 addPut(@Const @ByRef BasicDecimal128 right)
@ByRef @Name(value="operator -=") public BasicDecimal128 subtractPut(@Const @ByRef BasicDecimal128 right)
@ByRef @Name(value="operator *=") public BasicDecimal128 multiplyPut(@Const @ByRef BasicDecimal128 right)
public arrow.DecimalStatus Divide(@Const @ByRef BasicDecimal128 divisor, BasicDecimal128 result, BasicDecimal128 remainder)
divisor
- [in] the number to divide byresult
- [out] the quotientremainder
- [out] the remainder after the division@ByRef @Name(value="operator /=") public BasicDecimal128 dividePut(@Const @ByRef BasicDecimal128 right)
@ByRef @Name(value="operator |=") public BasicDecimal128 orPut(@Const @ByRef BasicDecimal128 right)
@ByRef @Name(value="operator &=") public BasicDecimal128 andPut(@Const @ByRef BasicDecimal128 right)
@ByRef @Name(value="operator <<=") public BasicDecimal128 shiftLeftPut(@Cast(value="uint32_t") int bits)
@ByRef @Name(value="operator >>=") public BasicDecimal128 shiftRightPut(@Cast(value="uint32_t") int bits)
@Cast(value="const int64_t") public long high_bits()
@Cast(value="const uint64_t") public long low_bits()
@ByVal public Long2Array native_endian_array()
@ByVal public Long2Array little_endian_array()
@Cast(value="const uint8_t*") public BytePointer native_endian_bytes()
@Cast(value="uint8_t*") public BytePointer mutable_native_endian_bytes()
@ByVal public Byte16Array ToBytes()
public void ToBytes(@Cast(value="uint8_t*") BytePointer out)
public void ToBytes(@Cast(value="uint8_t*") ByteBuffer out)
public void GetWholeAndFraction(int scale, BasicDecimal128 whole, BasicDecimal128 fraction)
@Const @ByRef public static BasicDecimal128 GetScaleMultiplier(int scale)
@Const @ByRef public static BasicDecimal128 GetHalfScaleMultiplier(int scale)
public arrow.DecimalStatus Rescale(int original_scale, int new_scale, BasicDecimal128 out)
@ByVal public BasicDecimal128 IncreaseScaleBy(int increase_by)
@ByVal public BasicDecimal128 ReduceScaleBy(int reduce_by, @Cast(value="bool") boolean round)
@ByVal public BasicDecimal128 ReduceScaleBy(int reduce_by)
@Cast(value="bool") public boolean FitsInPrecision(int precision)
precision
.public int CountLeadingBinaryZeros()
@Const @ByRef public static BasicDecimal128 GetMaxValue()
@Const @ByVal public static BasicDecimal128 GetMaxSentinel()
@Const @ByVal public static BasicDecimal128 GetMinSentinel()
Copyright © 2022. All rights reserved.