Package net.sf.saxon.trans
Class DecimalSymbols
- java.lang.Object
-
- net.sf.saxon.trans.DecimalSymbols
-
- All Implemented Interfaces:
java.io.Serializable
public class DecimalSymbols extends java.lang.Object implements java.io.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- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
decimalSeparator
int
digit
int
groupingSeparator
java.lang.String
infinity
int
minusSign
java.lang.String
NaN
int
patternSeparator
int
percent
int
permill
int
zeroDigit
(package private) static int[]
zeroDigits
-
Constructor Summary
Constructors Constructor Description DecimalSymbols()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkDistinctRoles()
Check that no character is used in more than one roleboolean
equals(java.lang.Object obj)
Test if two sets of decimal format symbols are the sameint
hashCode()
boolean
isValidZeroDigit()
Check that the character declared as a zero-digit is indeed a valid zero-digit
-
-
-
Field Detail
-
decimalSeparator
public int decimalSeparator
-
groupingSeparator
public int groupingSeparator
-
digit
public int digit
-
minusSign
public int minusSign
-
percent
public int percent
-
permill
public int permill
-
zeroDigit
public int zeroDigit
-
patternSeparator
public int patternSeparator
-
infinity
public java.lang.String infinity
-
NaN
public java.lang.String NaN
-
zeroDigits
static int[] zeroDigits
-
-
Method Detail
-
checkDistinctRoles
public void checkDistinctRoles() throws XPathException
Check that no character is used in more than one role- Throws:
XPathException
-
isValidZeroDigit
public boolean isValidZeroDigit() throws XPathException
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
- Throws:
XPathException
-
equals
public boolean equals(java.lang.Object obj)
Test if two sets of decimal format symbols are the same- Overrides:
equals
in classjava.lang.Object
- 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()
- Overrides:
hashCode
in classjava.lang.Object
-
-