net.sf.saxon.trans

Class DecimalSymbols

public class DecimalSymbols extends Object implements Serializable

This class is modelled on Java's DecimalFormatSymbols, but it allows the use of any Unicode character to represent symbols such as the decimal point and the grouping separator, whereas DecimalFormatSymbols restricts these to a char (1-65535). Since this is essentially a data structure with no behaviour, we don't bother with getter and setter methods but just expose the fields
Field Summary
intdecimalSeparator
intdigit
intgroupingSeparator
Stringinfinity
intminusSign
StringNaN
intpatternSeparator
intpercent
intpermill
intzeroDigit
static int[]zeroDigits
Method Summary
voidcheckDistinctRoles()
Check that no character is used in more than one role
booleanequals(Object obj)
Test if two sets of decimal format symbols are the same
inthashCode()
booleanisValidZeroDigit()
Check that the character declared as a zero-digit is indeed a valid zero-digit

Field Detail

decimalSeparator

public int decimalSeparator

digit

public int digit

groupingSeparator

public int groupingSeparator

infinity

public String infinity

minusSign

public int minusSign

NaN

public String NaN

patternSeparator

public int patternSeparator

percent

public int percent

permill

public int permill

zeroDigit

public int zeroDigit

zeroDigits

static int[] zeroDigits

Method Detail

checkDistinctRoles

public void checkDistinctRoles()
Check that no character is used in more than one role

Throws: XPathException

equals

public boolean equals(Object obj)
Test if two sets of decimal format symbols are the same

Parameters: obj the other set of symbols

Returns: true if the same characters/strings are assigned to each role in both sets of symbols

hashCode

public int hashCode()

isValidZeroDigit

public boolean isValidZeroDigit()
Check that the character declared as a zero-digit is indeed a valid zero-digit

Returns: false if it is not a valid zero-digit