Drag[en]gine Script Module DragonScript  1.23
Dragengine.UniqueID Class Reference

Immutable unique ID. More...

Inheritance diagram for Dragengine.UniqueID:

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...
 

Detailed Description

Immutable unique ID.

This is a native class.

Member Function Documentation

◆ compare()

int Dragengine.UniqueID.compare ( Object  obj)

Compare object with another object.

Used to sort objects. Overwrite to implement sorting.

Return values
0Object is equal to obj.
<0Object comes before obj.
>0Object comes after obj.

◆ equals()

bool Dragengine.UniqueID.equals ( Object  other)

Unique ID is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type UniqueID and both IDs are equal.

◆ getBitCount()

int Dragengine.UniqueID.getBitCount ( )

Bit count.

◆ getByteAt()

int Dragengine.UniqueID.getByteAt ( int  position)

Byte at position in LSB.

Exceptions
EOutOfBoundaryposition is less than 0 or larger than or equal to getBitCount().

◆ hashCode()

int Dragengine.UniqueID.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ new() [1/2]

UniqueID Dragengine.UniqueID.new ( )

Create unique id with value 0.

◆ new() [2/2]

UniqueID Dragengine.UniqueID.new ( int  value)

Create unique id with value.

◆ newFromHexString()

static UniqueID Dragengine.UniqueID.newFromHexString ( String  string)
static

Unique id from hex string.

◆ operator+() [1/2]

UniqueID Dragengine.UniqueID.operator+ ( int  value)

UniqueID incremented by value.

◆ operator+() [2/2]

UniqueID Dragengine.UniqueID.operator+ ( UniqueID  id)

UniqueID incremented by another UniqueID.

◆ operator-() [1/2]

UniqueID Dragengine.UniqueID.operator- ( int  value)

UniqueID decremented by value.

◆ operator-() [2/2]

UniqueID Dragengine.UniqueID.operator- ( UniqueID  id)

UniqueID decremented by another UniqueID.

◆ operator<()

bool Dragengine.UniqueID.operator< ( UniqueID  id)

ID is less than another ID.

◆ operator<=()

bool Dragengine.UniqueID.operator<= ( UniqueID  id)

ID is less than or equal to another ID.

◆ operator>()

bool Dragengine.UniqueID.operator> ( UniqueID  id)

ID is greater than another ID.

◆ operator>=()

bool Dragengine.UniqueID.operator>= ( UniqueID  id)

ID is greater than or equal to another ID.

◆ readFromFile()

static UniqueID Dragengine.UniqueID.readFromFile ( FileReader  reader)
static

Read unique id from a file reader.

◆ toHexString()

String Dragengine.UniqueID.toHexString ( )

Hex string representation.

◆ toString()

String Dragengine.UniqueID.toString ( )

String representation of unique id.

◆ writeToFile()

void Dragengine.UniqueID.writeToFile ( FileWriter  writer)

Write unique id to a file writer.


The documentation for this class was generated from the following file: