Class NumberToken
A Token representing a numerical value.
Implements
Namespace: Sdl.Core.Bcm.BcmModel.Tokenization.Tokens
Assembly: Sdl.Core.Bcm.BcmModel.dll
Syntax
public class NumberToken : Token, ICloneable<Token>
Constructors
NumberToken()
Initializes a new instance of the NumberToken class.
Declaration
public NumberToken()
NumberToken(String, NumericSeparator, NumericSeparator, Char, Char, Sign, String, String, String)
Initializes a new instance with the specified values.
Declaration
public NumberToken(string text, NumericSeparator groupSeparator, NumericSeparator decimalSeparator, char alternateGroupSeparator, char alternateDecimalSeparator, Sign sign, string rawSign, string rawDecimalDigits, string rawFractionalDigits)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text of the token, as it appeared in the input |
NumericSeparator | groupSeparator | The type of group separator used |
NumericSeparator | decimalSeparator | The type of decimal separator used |
System.Char | alternateGroupSeparator | The character of an alternative group separator, if used |
System.Char | alternateDecimalSeparator | The character of an alternative decimal separator, if used |
Sign | sign | The type of sign used |
System.String | rawSign | The "raw text" of the sign |
System.String | rawDecimalDigits | The "raw decimal digits", without separators, between 0-9 |
System.String | rawFractionalDigits | The "raw fractional digits", without separators, between 0-9 |
Properties
AlternateDecimalSeparator
Gets or sets an alternate decimal separator, which is a single char if an alternate separator is used, or the null character if no alternate separator is used.
Declaration
public char AlternateDecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Char |
AlternateGroupSeparator
Gets or sets an alternate group separator, which is a single char if an alternate separator is used, or the null character if no alternate separator is used.
Declaration
public char AlternateGroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Char |
DecimalSeparator
Gets or sets the decimal separator
Declaration
public NumericSeparator DecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
NumericSeparator |
GroupSeparator
Gets or sets the group separator
Declaration
public NumericSeparator GroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
NumericSeparator |
RawDecimalDigits
Gets or sets the raw decimal digits, which are a sequence of digits without separators or signs.
Declaration
public string RawDecimalDigits { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RawFractionalDigits
Gets or sets the raw fractional digits, which are a sequence of digits without separators or signs.
Declaration
public string RawFractionalDigits { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RawSign
Gets or sets the "raw" sign, i.e. the textual representation of the sign
Declaration
public string RawSign { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Sign
Gets or sets the sign.
Declaration
public Sign Sign { get; set; }
Property Value
Type | Description |
---|---|
Sign |
Type
Gets the type of Token.
Declaration
protected override string Type { get; }
Property Value
Type | Description |
---|---|
System.String | The type. |