Package jflex.core.unicode
Class UnicodeProperties
- java.lang.Object
-
- jflex.core.unicode.UnicodeProperties
-
public class UnicodeProperties extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnicodeProperties.UnsupportedUnicodeVersionException
-
Field Summary
Fields Modifier and Type Field Description static String
UNICODE_VERSIONS
-
Constructor Summary
Constructors Constructor Description UnicodeProperties()
Unpacks the Unicode data corresponding to the default Unicode version: ""12.1"".UnicodeProperties(String version)
Unpacks the Unicode data corresponding to the given version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntCharSet
getCaselessMatches(int c)
Returns a set of character intervals representing all characters that are case-insensitively equivalent to the given character, including the given character itself.IntCharSet
getIntCharSet(String propertyValue)
Returns the character interval set associated with the given property value for the selected Unicode version.int
getMaximumCodePoint()
Returns the maximum code point for the selected Unicode version.Set<String>
getPropertyValues()
Returns the set of all properties, property values, and their aliases supported by the specified Unicode version.
-
-
-
Field Detail
-
UNICODE_VERSIONS
public static final String UNICODE_VERSIONS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnicodeProperties
public UnicodeProperties() throws UnicodeProperties.UnsupportedUnicodeVersionException
Unpacks the Unicode data corresponding to the default Unicode version: ""12.1"".- Throws:
UnicodeProperties.UnsupportedUnicodeVersionException
- if the default version is not supported.
-
UnicodeProperties
public UnicodeProperties(String version) throws UnicodeProperties.UnsupportedUnicodeVersionException
Unpacks the Unicode data corresponding to the given version.- Parameters:
version
- The Unicode version for which to unpack data- Throws:
UnicodeProperties.UnsupportedUnicodeVersionException
- if the given version is not supported.
-
-
Method Detail
-
getMaximumCodePoint
public int getMaximumCodePoint()
Returns the maximum code point for the selected Unicode version.- Returns:
- the maximum code point for the selected Unicode version.
-
getIntCharSet
public IntCharSet getIntCharSet(String propertyValue)
Returns the character interval set associated with the given property value for the selected Unicode version.- Parameters:
propertyValue
- The Unicode property or property value (or alias for one of these) for which to return the corresponding character intervals.- Returns:
- The character interval set corresponding to the given property value, if a match exists, and null otherwise.
-
getPropertyValues
public Set<String> getPropertyValues()
Returns the set of all properties, property values, and their aliases supported by the specified Unicode version.- Returns:
- The set of all properties supported by the specified Unicode version
-
getCaselessMatches
public IntCharSet getCaselessMatches(int c)
Returns a set of character intervals representing all characters that are case-insensitively equivalent to the given character, including the given character itself.The first call to this method lazily initializes the backing data.
- Parameters:
c
- The character for which to return case-insensitive equivalents.- Returns:
- All case-insensitively equivalent characters, or null if the given character is case-insensitively equivalent only to itself.
-
-