Drag[en]gine Script Module DragonScript
1.23
|
Immutable unique ID. More...
Public Member Functions | |
Constructors | |
UniqueID | new () |
Create unique id with value 0. More... | |
UniqueID | new (int value) |
Create unique id with value. More... | |
Operators | |
UniqueID | operator+ (int value) |
UniqueID incremented by value. More... | |
UniqueID | operator+ (UniqueID id) |
UniqueID incremented by another UniqueID. More... | |
UniqueID | operator- (int value) |
UniqueID decremented by value. More... | |
UniqueID | operator- (UniqueID id) |
UniqueID decremented by another UniqueID. More... | |
bool | operator< (UniqueID id) |
ID is less than another ID. More... | |
bool | operator<= (UniqueID id) |
ID is less than or equal to another ID. More... | |
bool | operator> (UniqueID id) |
ID is greater than another ID. More... | |
bool | operator>= (UniqueID id) |
ID is greater than or equal to another ID. More... | |
Management | |
int | getBitCount () |
Bit count. More... | |
int | getByteAt (int position) |
Byte at position in LSB. More... | |
String | toHexString () |
Hex string representation. More... | |
String | toString () |
String representation of unique id. More... | |
bool | equals (Object other) |
Unique ID is equal to another object. More... | |
int | compare (Object obj) |
Compare object with another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
static UniqueID | newFromHexString (String string) |
Unique id from hex string. More... | |
File Handling | |
void | writeToFile (FileWriter writer) |
Write unique id to a file writer. More... | |
static UniqueID | readFromFile (FileReader reader) |
Read unique id from a file reader. More... | |
Immutable unique ID.
This is a native class.
int Dragengine.UniqueID.compare | ( | Object | obj | ) |
Compare object with another object.
Used to sort objects. Overwrite to implement sorting.
0 | Object is equal to obj. |
<0 | Object comes before obj. |
>0 | Object comes after obj. |
bool Dragengine.UniqueID.equals | ( | Object | other | ) |
Unique ID is equal to another object.
Implements Object.equals(Object).
int Dragengine.UniqueID.getBitCount | ( | ) |
Bit count.
int Dragengine.UniqueID.getByteAt | ( | int | position | ) |
Byte at position in LSB.
EOutOfBoundary | position is less than 0 or larger than or equal to getBitCount(). |
int Dragengine.UniqueID.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
UniqueID Dragengine.UniqueID.new | ( | ) |
Create unique id with value 0.
UniqueID Dragengine.UniqueID.new | ( | int | value | ) |
Create unique id with value.
|
static |
Unique id from hex string.
bool Dragengine.UniqueID.operator< | ( | UniqueID | id | ) |
ID is less than another ID.
bool Dragengine.UniqueID.operator<= | ( | UniqueID | id | ) |
ID is less than or equal to another ID.
bool Dragengine.UniqueID.operator> | ( | UniqueID | id | ) |
ID is greater than another ID.
bool Dragengine.UniqueID.operator>= | ( | UniqueID | id | ) |
ID is greater than or equal to another ID.
|
static |
Read unique id from a file reader.
String Dragengine.UniqueID.toHexString | ( | ) |
Hex string representation.
String Dragengine.UniqueID.toString | ( | ) |
String representation of unique id.
void Dragengine.UniqueID.writeToFile | ( | FileWriter | writer | ) |
Write unique id to a file writer.