ggencoder.datastructures
Class AbstractRawCode

java.lang.Object
  extended byggencoder.datastructures.AbstractRawCode
All Implemented Interfaces:
RawCode
Direct Known Subclasses:
BasicGBGGRawCode, BasicGenesisRawCode, BasicNESRawCode, BasicSNESRawCode

public abstract class AbstractRawCode
extends java.lang.Object
implements RawCode

Abstract implementation of the RawCode interface.

Version:
1.2, 07/14/04
Author:
John David Ratliff

Constructor Summary
AbstractRawCode()
           
 
Method Summary
 int getAddress()
          Gets the address of this code.
 int getValue()
          Gets the value of this code.
 void setAddress(int address)
          Sets the address of this code.
 void setValue(int value)
          Sets the value of this code.
 java.lang.String toHexString(int number, int minLength)
          Builds a hex string from an integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRawCode

public AbstractRawCode()
Method Detail

getAddress

public int getAddress()
Gets the address of this code.

Specified by:
getAddress in interface RawCode
Returns:
The code's address.

setAddress

public void setAddress(int address)
Sets the address of this code.

Specified by:
setAddress in interface RawCode
Parameters:
address - The code's address.

getValue

public int getValue()
Gets the value of this code.

Specified by:
getValue in interface RawCode
Returns:
The code's value.

setValue

public void setValue(int value)
Sets the value of this code.

Specified by:
setValue in interface RawCode
Parameters:
value - The code's value.

toHexString

public java.lang.String toHexString(int number,
                                    int minLength)
Builds a hex string from an integer.

Parameters:
number - The number to build the hex string from.
minLength - The minimum length of the hex string.
Returns:
The constructed hex string.