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

String identifier for efficient comparison. More...

Inheritance diagram for StringID:

Public Member Functions

Constructors
StringID new ()
 Create string identifier for the empty string. More...
 
StringID new (String identifier)
 Create string identifier for string. More...
 
Management
String toString ()
 String this string identifier represents. More...
 
bool equals (Object other)
 String identifier is equal to another object. More...
 
int hashCode ()
 Hash code for use as dictionary keys. More...
 

File Handling

void writeToFile (FileWriter writer)
 Write string identifier to a file writer. More...
 
static StringID readFromFile (FileReader reader)
 Read string identifier from a file reader. More...
 

Detailed Description

String identifier for efficient comparison.

String identifiers are entered into a global list of string identifiers and the position in the table stored. Comparison is efficiently done using the index instead of a full string comparison.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

String identifier is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type StringID and their table position matches or other is of type String and matches the string at the table position.

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ new() [1/2]

StringID new ( )

Create string identifier for the empty string.

§ new() [2/2]

StringID new ( String  identifier)

Create string identifier for string.

§ readFromFile()

static StringID readFromFile ( FileReader  reader)
static

Read string identifier from a file reader.

§ toString()

String toString ( )

String this string identifier represents.

§ writeToFile()

void writeToFile ( FileWriter  writer)

Write string identifier to a file writer.


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