public static class Pipe.PaddedInt extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
padding1 |
int |
padding10 |
int |
padding11 |
int |
padding13 |
int |
padding14 |
int |
padding15 |
int |
padding16 |
int |
padding2 |
int |
padding3 |
int |
padding4 |
int |
padding5 |
int |
padding6 |
int |
padding7 |
int |
padding8 |
int |
padding9 |
int |
value |
| Constructor and Description |
|---|
PaddedInt() |
| Modifier and Type | Method and Description |
|---|---|
static int |
add(Pipe.PaddedInt pi,
int inc)
Adds the provided increment to the existing value of the int.
|
static int |
get(Pipe.PaddedInt pi)
Provides access to the value of this PaddedInt.
|
static int |
maskedAdd(Pipe.PaddedInt pi,
int inc,
int wrapMask)
Provides an increment routine to support the need to wrap the head and tail markers of a buffer from the
maximum int value to 0 without going negative.
|
static void |
set(Pipe.PaddedInt pi,
int value)
Sets the value of the provided PaddedInt.
|
String |
toString()
Provides a readable representation of the value of this padded long instance.
|
public int value
public int padding1
public int padding2
public int padding3
public int padding4
public int padding5
public int padding6
public int padding7
public int padding8
public int padding9
public int padding10
public int padding11
public int padding13
public int padding14
public int padding15
public int padding16
public static int get(Pipe.PaddedInt pi)
pi - is the PaddedInt containing the desired value.public static void set(Pipe.PaddedInt pi, int value)
pi - is the padded int to contain the value.value - is the value to be put into the padded int.public static int add(Pipe.PaddedInt pi, int inc)
pi - is the padded int containing the value to increment.inc - is the amount to add.public static int maskedAdd(Pipe.PaddedInt pi, int inc, int wrapMask)
anded to the provided mask to remove any
sign bit that may have been set in the case of an overflow of the maximum-sized integer.
N.B. A PaddedInt is initialized to zero. There is no problem invoking this method on a PaddedInt
that has never had the set method called. It may not achieve the desired effect, but it will not cause a
runtime error.pi - is the padded int containing the value to increment.inc - is the amount to add.Copyright © 2018. All Rights Reserved.