C# Class RTools.Util.IntToken

Token type for integer tokens. This handles both Int32 and Int64.
Inheritance: Token
Show file Open project: PaulMineau/AIMA.Net Class Usage Examples

Public Methods

Method Description
Equals ( object other ) : bool

Override, see base Token

GetHashCode ( ) : int

Override, see base Token

IntToken ( int i ) : System

Constructor with the specified value.

IntToken ( int i, int line ) : System

Constructor with the specified value and line number.

IntToken ( long i ) : System

Constructor with the specified value.

IntToken ( long l, int line ) : System

Constructor for a 64 bit int

IntToken ( string s ) : System

Constructor with the specified value.

IntToken ( string s, int line ) : System

Constructor with the specified value and line number.

ParseHex ( string s, int lineNumber ) : IntToken

Parse a string known to be a hex string. This is faster than Parse which doesn't assume the number is Hex. This will throw an exception if the input number isn't hex.

ToDebugString ( ) : string

Override, see base Token

ToString ( ) : string

Override, see base Token

Private Methods

Method Description
Parse ( string s ) : void

Convert the input string to an integer, if possible

Method Details

Equals() public method

Override, see base Token
public Equals ( object other ) : bool
other object
return bool

GetHashCode() public method

Override, see base Token
public GetHashCode ( ) : int
return int

IntToken() public method

Constructor with the specified value.
public IntToken ( int i ) : System
i int
return System

IntToken() public method

Constructor with the specified value and line number.
public IntToken ( int i, int line ) : System
i int
line int
return System

IntToken() public method

Constructor with the specified value.
public IntToken ( long i ) : System
i long
return System

IntToken() public method

Constructor for a 64 bit int
public IntToken ( long l, int line ) : System
l long
line int
return System

IntToken() public method

Constructor with the specified value.
public IntToken ( string s ) : System
s string
return System

IntToken() public method

Constructor with the specified value and line number.
public IntToken ( string s, int line ) : System
s string
line int
return System

ParseHex() public static method

Parse a string known to be a hex string. This is faster than Parse which doesn't assume the number is Hex. This will throw an exception if the input number isn't hex.
public static ParseHex ( string s, int lineNumber ) : IntToken
s string The hex number as a string.
lineNumber int The line where this token was found.
return IntToken

ToDebugString() public method

Override, see base Token
public ToDebugString ( ) : string
return string

ToString() public method

Override, see base Token
public ToString ( ) : string
return string