public class ShortBasedStorage extends java.lang.Object implements DataStorage
IElementType
index and and restartability of the state (positive values are for initial state).Modifier and Type | Field and Description |
---|---|
protected short[] |
myData |
Modifier | Constructor and Description |
---|---|
|
ShortBasedStorage() |
protected |
ShortBasedStorage(short[] data) |
Modifier and Type | Method and Description |
---|---|
DataStorage |
copy() |
DataStorage |
createStorage() |
int |
getData(int index) |
void |
insert(DataStorage storageToInsert,
int startIndex,
int segmentCountToInsert,
int segmentCount) |
protected static short [] |
insert(short [] array,
short [] insertArray,
int startIndex,
int insertLength,
int mySegmentCount) |
int |
packData(IElementType tokenType,
int state,
boolean isRestartableState) |
protected static short [] |
reallocateArray(short [] array,
int index) |
void |
remove(int startIndex,
int endIndex,
int mySegmentCount) |
void |
replace(DataStorage storage,
int startOffset,
int len) |
void |
setData(int segmentIndex,
int data) |
int |
unpackStateFromData(int data) |
IElementType |
unpackTokenFromData(int data) |
public ShortBasedStorage()
protected ShortBasedStorage(short[] data)
public void setData(int segmentIndex, int data)
setData
in interface DataStorage
public void remove(int startIndex, int endIndex, int mySegmentCount)
remove
in interface DataStorage
public void replace(DataStorage storage, int startOffset, int len)
replace
in interface DataStorage
public void insert(DataStorage storageToInsert, int startIndex, int segmentCountToInsert, int segmentCount)
insert
in interface DataStorage
public int getData(int index)
getData
in interface DataStorage
public int packData(IElementType tokenType, int state, boolean isRestartableState)
packData
in interface DataStorage
public int unpackStateFromData(int data)
unpackStateFromData
in interface DataStorage
public IElementType unpackTokenFromData(int data)
unpackTokenFromData
in interface DataStorage
public DataStorage copy()
copy
in interface DataStorage
public DataStorage createStorage()
createStorage
in interface DataStorage
protected static short [] insert(short [] array, short [] insertArray, int startIndex, int insertLength, int mySegmentCount)
protected static short [] reallocateArray(short [] array, int index)