| Modifier and Type | Method and Description |
|---|---|
static long |
shiftLeft(DecimalRounding rounding,
long uDecimal,
int positions)
Performs a shift left operation applying the given rounding mode if
rounding is necessary.
|
static long |
shiftLeftChecked(DecimalArithmetic arith,
DecimalRounding rounding,
long uDecimal,
int positions)
Performs a shift left operation applying the given rounding mode if
rounding is necessary.
|
static long |
shiftRight(DecimalRounding rounding,
long uDecimal,
int positions)
Performs a shift right operation applying the given rounding mode if
rounding is necessary.
|
static long |
shiftRightChecked(DecimalArithmetic arith,
DecimalRounding rounding,
long uDecimal,
int positions)
Performs a shift right operation applying the given rounding mode if
rounding is necessary.
|
public static final long shiftLeft(DecimalRounding rounding, long uDecimal, int positions)
rounding - the rounding to apply for negative position (i.e. a right
shift)uDecimal - the value to shiftpositions - the positions to shiftround(uDecimal << positions)public static final long shiftRight(DecimalRounding rounding, long uDecimal, int positions)
rounding - the rounding to apply if necessaryuDecimal - the value to shiftpositions - the positions to shiftround(uDecimal >> positions)public static final long shiftLeftChecked(DecimalArithmetic arith, DecimalRounding rounding, long uDecimal, int positions)
arith - the arithmetic associated with the shifted valuerounding - the rounding to apply for negative position (i.e. a right
shift)uDecimal - the value to shiftpositions - the positions to shiftround(uDecimal << positions)ArithmeticException - if an overflow occurs and the arithmetic's
OverflowMode is set to throw an exceptionpublic static final long shiftRightChecked(DecimalArithmetic arith, DecimalRounding rounding, long uDecimal, int positions)
arith - the arithmetic associated with the shifted valuerounding - the rounding to apply if necessaryuDecimal - the value to shiftpositions - the positions to shiftround(uDecimal >> positions)ArithmeticException - if an overflow occurs and the arithmetic's
OverflowMode is set to throw an exception