@ThreadRestricted(value="touch") public final class IndexOffsetter extends Object implements Serializable
Constructor and Description |
---|
IndexOffsetter(int s)
Constructs an IndexOffsetter.
|
Modifier and Type | Method and Description |
---|---|
int |
actualIndex(int logicalIndex)
Returns the actual index of a given logical index.
|
void |
setActualIndexOfLogicalZero(int actualIndex)
Sets the actual index of logical index zero.
|
int |
size()
Returns the size of the sequence.
|
public IndexOffsetter(int s)
s
- size per size()public int actualIndex(int logicalIndex)
logicalIndex
- logical index in sequence (positive or negative)ArrayIndexOutOfBoundsException
- if |logicalIndex| >= size()@ThreadRestricted public void setActualIndexOfLogicalZero(int actualIndex)
ArrayIndexOutOfBoundsException
- if actualIndex < 0
or actualIndex >= size()public int size()