public class BaseEntity extends Object
| Modifier and Type | Field and Description |
|---|---|
private Dataset |
dataSet
The data set the item relates to.
|
private int |
offsetOrIndex
The unique index of the item in the collection of items, or the unique
offset to the item in the source data structure.
|
| Constructor and Description |
|---|
BaseEntity(Dataset dataSet,
int offsetOrIndex)
Constructs the base item for the data set and index provided.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
binarySearch(BaseEntity[] list,
int indexOrOffset)
Uses a divide and conquer method to search the ordered list of indexes.
|
protected Dataset |
getDataSet() |
int |
getIndex() |
(package private) static int[] |
readIntegerArray(BinaryReader reader,
int count)
Reads an integer array where the first integer is the number of following
integers.
|
private final Dataset dataSet
private final int offsetOrIndex
BaseEntity(Dataset dataSet, int offsetOrIndex)
dataSet - The data set the item is contained withinindex - The index of the item within the datasetprotected int binarySearch(BaseEntity[] list, int indexOrOffset)
list - List of entities to be searchedindexOrOffset - The index or offset to be soughtstatic int[] readIntegerArray(BinaryReader reader, int count)
reader - Reader set to the position at the start of the listcount - The number of integers to read to form the arrayprotected Dataset getDataSet()
public int getIndex()