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

Mutable unique ID. More...

Inheritance diagram for MutableID:

Public Member Functions

Constructors
MutableID new ()
 Create mutuable unique id with initial value 0. More...
 
MutableID new (UniqueID id)
 Create mutuable unique id from unique id. More...
 
MutableID new (MutableID id)
 Create copy of mutuable unique id. More...
 
Management
int getBitCount ()
 Bit count. More...
 
void setBitCount (int bitCount)
 Set bit count. More...
 
int getByteAt (int position)
 Byte at position in LSB. More...
 
void setByteAt (int position, int value)
 Set byte at position in LSB. More...
 
void increment ()
 Increment id by 1. More...
 
void reset ()
 Reset id to 0 with a bit count of 8. More...
 
void setFrom (UniqueID id)
 Copy value of a unique ID. More...
 
void setFromMutable (MutableID id)
 Copy value of another mutable ID. More...
 
UniqueID toUniqueID ()
 Create unique id from id. More...
 
String toHexString ()
 Hex string representation. More...
 
void setFromHexString (String string)
 Set from hex string. More...
 
String toString ()
 String representation of mutable id. More...
 
bool equals (Object other)
 Mutable ID is equal to another object. More...
 
int hashCode ()
 Hash code for use as dictionary keys. More...
 

File Handling

void writeToFile (FileWriter writer)
 Write mutable id to a file writer. More...
 
static MutableID readFromFile (FileReader reader)
 Read mutable id from a file reader. More...
 

Detailed Description

Mutable unique ID.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

Mutable ID is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type MutableID 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().

§ increment()

void increment ( )

Increment id by 1.

Increases the bit count by 8 if the new value does not fit anymore.

§ new() [1/3]

MutableID new ( )

Create mutuable unique id with initial value 0.

§ new() [2/3]

MutableID new ( UniqueID  id)

Create mutuable unique id from unique id.

§ new() [3/3]

MutableID new ( MutableID  id)

Create copy of mutuable unique id.

§ readFromFile()

static MutableID readFromFile ( FileReader  reader)
static

Read mutable id from a file reader.

§ reset()

void reset ( )

Reset id to 0 with a bit count of 8.

§ setBitCount()

void setBitCount ( int  bitCount)

Set bit count.

The id is reset to 0 no matter if the bit count changed or not.

§ setByteAt()

void setByteAt ( int  position,
int  value 
)

Set byte at position in LSB.

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

§ setFrom()

void setFrom ( UniqueID  id)

Copy value of a unique ID.

§ setFromHexString()

void setFromHexString ( String  string)

Set from hex string.

§ setFromMutable()

void setFromMutable ( MutableID  id)

Copy value of another mutable ID.

§ toHexString()

String toHexString ( )

Hex string representation.

§ toString()

String toString ( )

String representation of mutable id.

§ toUniqueID()

UniqueID toUniqueID ( )

Create unique id from id.

§ writeToFile()

void writeToFile ( FileWriter  writer)

Write mutable id to a file writer.


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