Drag[en]gine Script Module DragonScript  1.21
Dragengine.MutableID Class Reference

Mutable unique ID. More...

Inheritance diagram for Dragengine.MutableID:

Public Member Functions

Constructors
MutableID new ()
 Create mutuable unique id with initial value 0. More...
 
MutableID new (int value)
 Create mutuable unique id with initial value. 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 incrementBy (int amount)
 Increment id by amount. More...
 
void incrementBy (UniqueID amount)
 Increment id by UniqueID. More...
 
void incrementBy (MutableID amount)
 Increment id by MutableID. More...
 
void decrement ()
 Decrement id by 1. More...
 
void decrementBy (int amount)
 Decrement id by amount. More...
 
void decrementBy (UniqueID amount)
 Decrement id by UniqueID. More...
 
void decrementBy (MutableID amount)
 Decrement id by MutableID. 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...
 
UniqueID nextID ()
 Create unique id from id then increment. 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 readFromFile (FileReader reader)
 Read from file reader. More...
 
void writeToFile (FileWriter writer)
 Write to file writer. More...
 
Operators
bool operator< (MutableID id)
 ID is less than another ID. More...
 
bool operator<= (MutableID id)
 ID is less than or equal to another ID. More...
 
bool operator> (MutableID id)
 ID is greater than another ID. More...
 
bool operator>= (MutableID id)
 ID is greater than or equal to another ID. More...
 

Detailed Description

Mutable unique ID.

This is a native class.

Member Function Documentation

◆ decrement()

void Dragengine.MutableID.decrement ( )

Decrement id by 1.

◆ decrementBy() [1/3]

void Dragengine.MutableID.decrementBy ( int  amount)

Decrement id by amount.

◆ decrementBy() [2/3]

void Dragengine.MutableID.decrementBy ( MutableID  amount)

Decrement id by MutableID.

◆ decrementBy() [3/3]

void Dragengine.MutableID.decrementBy ( UniqueID  amount)

Decrement id by UniqueID.

◆ equals()

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

Bit count.

◆ getByteAt()

int Dragengine.MutableID.getByteAt ( int  position)

Byte at position in LSB.

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

◆ hashCode()

int Dragengine.MutableID.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ increment()

void Dragengine.MutableID.increment ( )

Increment id by 1.

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

◆ incrementBy() [1/3]

void Dragengine.MutableID.incrementBy ( int  amount)

Increment id by amount.

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

◆ incrementBy() [2/3]

void Dragengine.MutableID.incrementBy ( MutableID  amount)

Increment id by MutableID.

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

◆ incrementBy() [3/3]

void Dragengine.MutableID.incrementBy ( UniqueID  amount)

Increment id by UniqueID.

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

◆ new() [1/4]

MutableID Dragengine.MutableID.new ( )

Create mutuable unique id with initial value 0.

◆ new() [2/4]

MutableID Dragengine.MutableID.new ( int  value)

Create mutuable unique id with initial value.

◆ new() [3/4]

MutableID Dragengine.MutableID.new ( MutableID  id)

Create copy of mutuable unique id.

◆ new() [4/4]

MutableID Dragengine.MutableID.new ( UniqueID  id)

Create mutuable unique id from unique id.

◆ nextID()

UniqueID Dragengine.MutableID.nextID ( )

Create unique id from id then increment.

Convenience call equal to calling toUniqueID() then increment().

◆ operator<()

bool Dragengine.MutableID.operator< ( MutableID  id)

ID is less than another ID.

◆ operator<=()

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

ID is less than or equal to another ID.

◆ operator>()

bool Dragengine.MutableID.operator> ( MutableID  id)

ID is greater than another ID.

◆ operator>=()

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

ID is greater than or equal to another ID.

◆ readFromFile()

void Dragengine.MutableID.readFromFile ( FileReader  reader)

Read from file reader.

◆ reset()

void Dragengine.MutableID.reset ( )

Reset id to 0 with a bit count of 8.

◆ setBitCount()

void Dragengine.MutableID.setBitCount ( int  bitCount)

Set bit count.

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

◆ setByteAt()

void Dragengine.MutableID.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 Dragengine.MutableID.setFrom ( UniqueID  id)

Copy value of a unique ID.

◆ setFromHexString()

void Dragengine.MutableID.setFromHexString ( String  string)

Set from hex string.

◆ setFromMutable()

void Dragengine.MutableID.setFromMutable ( MutableID  id)

Copy value of another mutable ID.

◆ toHexString()

String Dragengine.MutableID.toHexString ( )

Hex string representation.

◆ toString()

String Dragengine.MutableID.toString ( )

String representation of mutable id.

◆ toUniqueID()

UniqueID Dragengine.MutableID.toUniqueID ( )

Create unique id from id.

◆ writeToFile()

void Dragengine.MutableID.writeToFile ( FileWriter  writer)

Write to file writer.


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