Drag[en]gine Script Module DragonScript Script API  1.0
UniqueID Class Reference

Immutable unique ID. More...

Inheritance diagram for 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 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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

◆ equals()

bool 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 getBitCount ( )

Bit count.

◆ getByteAt()

int getByteAt ( int  position)

Byte at position in LSB.

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

◆ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ new() [1/2]

UniqueID new ( )

Create unique id with value 0.

◆ new() [2/2]

UniqueID new ( int  value)

Create unique id with value.

◆ newFromHexString()

static UniqueID newFromHexString ( String  string)
static

Unique id from hex string.

◆ operator+() [1/4]

UniqueID operator+ ( int  value)

UniqueID incremented by value.

◆ operator+() [2/4]

UniqueID operator+ ( UniqueID  id)

UniqueID incremented by another UniqueID.

◆ operator+() [3/4]

UniqueID operator+ ( int  value)

UniqueID decremented by value.

◆ operator+() [4/4]

UniqueID operator+ ( UniqueID  id)

UniqueID decremented by another UniqueID.

◆ operator<()

bool operator< ( UniqueID  id)

ID is less than another ID.

◆ operator<=()

bool operator<= ( UniqueID  id)

ID is less than or equal to another ID.

◆ operator>()

bool operator> ( UniqueID  id)

ID is greater than another ID.

◆ operator>=()

bool operator>= ( UniqueID  id)

ID is greater than or equal to another ID.

◆ readFromFile()

static UniqueID readFromFile ( FileReader  reader)
static

Read unique id from a file reader.

◆ toHexString()

String toHexString ( )

Hex string representation.

◆ toString()

String toString ( )

String representation of unique id.

◆ writeToFile()

void writeToFile ( FileWriter  writer)

Write unique id to a file writer.


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