public class TableWithFourServiceBits
extends java.lang.Object
Constructor and Description |
---|
TableWithFourServiceBits(int nElements) |
Modifier and Type | Method and Description |
---|---|
int |
elementAt(int index)
Return the integer reference stored at a given position
|
java.lang.String |
elementToString(int i)
Return a string representing the i-th element stored in the table
The result contains an integer value, and the two service bits.
|
int |
getBit0(int index)
Get the value of the first service bit of a reference.
|
int |
getBit1(int index) |
int |
getBit2(int index) |
int |
getBit3(int index) |
static void |
main(java.lang.String[] args) |
void |
set(int index,
int element)
Set the reference stored at a given position in the array
|
void |
setBit0(int index)
Set to 1 the first service bit, of a given reference.
|
void |
setBit1(int index) |
void |
setBit2(int index) |
void |
setBit3(int index) |
public int elementAt(int index)
public void set(int index, int element)
public int getBit0(int index)
public int getBit1(int index)
public int getBit2(int index)
public int getBit3(int index)
public void setBit0(int index)
public void setBit1(int index)
public void setBit2(int index)
public void setBit3(int index)
public java.lang.String elementToString(int i)
public static void main(java.lang.String[] args)