public final class Characters extends Static
char
values, and some character constants.
Apache SIS uses Unicode symbols directly in the source code for easier reading,
except for some symbols that are difficult to differentiate from other similar
symbols. For those symbols, constants are declared in this class.Defined in the sis-utility
module
Modifier and Type | Class and Description |
---|---|
static class |
Characters.Filter
Subsets of Unicode characters identified by their general category.
|
Modifier and Type | Field and Description |
---|---|
static char |
HYPHEN
Hyphen character ('‐', Unicode
2010 ). |
static char |
LINE_SEPARATOR
The Unicode line separator (Unicode
2028 , HTML <br> ). |
static char |
NO_BREAK_SPACE
The no-break space (Unicode
00A0 , HTML ). |
static char |
PARAGRAPH_SEPARATOR
The Unicode paragraph separator (Unicode
2029 , HTML <p>…</p> ). |
static char |
SOFT_HYPHEN
Hyphen character to be visible only if there is a line break to insert after it
(Unicode
00AD , HTML ­ ). |
Modifier and Type | Method and Description |
---|---|
static boolean |
isLineOrParagraphSeparator(int c)
Returns
true if the given code point is a line separator, a paragraph separator or one
of the '\r' or '\n' control characters. |
static boolean |
isSubScript(int c)
Determines whether the given character is a subscript.
|
static boolean |
isSuperScript(int c)
Determines whether the given character is a superscript.
|
static char |
toNormalScript(char c)
Converts the given character argument to normal script.
|
static char |
toSubScript(char c)
Converts the given character argument to subscript.
|
static char |
toSuperScript(char c)
Converts the given character argument to superscript.
|
public static final char HYPHEN
2010
).
This code tells to LineAppender
that a line break is allowed to be inserted after this character.
For non-breaking hyphen, use the Unicode 2011
character.
public static final char SOFT_HYPHEN
00AD
, HTML ­
).
Otherwise this character is invisible. When visible, the graphical symbol is similar
to the HYPHEN
character.public static final char NO_BREAK_SPACE
00A0
, HTML
).
Apache SIS uses Unicode symbols directly in the source code for easier reading,
except for no-break spaces since they can not be visually distinguished from the
ordinary space (Unicode 0020
).public static final char LINE_SEPARATOR
2028
, HTML <br>
).public static final char PARAGRAPH_SEPARATOR
2029
, HTML <p>…</p>
).public static boolean isLineOrParagraphSeparator(int c)
true
if the given code point is a line separator, a paragraph separator or one
of the '\r'
or '\n'
control characters.c
- The code point to test.true
if the given code point is a line or paragraph separator.LINE_SEPARATOR
,
PARAGRAPH_SEPARATOR
public static boolean isSuperScript(int c)
⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ
c
- The character to test.true
if the given character is a superscript.public static boolean isSubScript(int c)
₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎
c
- The character to test.true
if the given character is a subscript.public static char toSuperScript(char c)
0 1 2 3 4 5 6 7 8 9 + - = ( ) n
c
- The character to convert.c
if the given character can not be converted.public static char toSubScript(char c)
0 1 2 3 4 5 6 7 8 9 + - = ( )
c
- The character to convert.c
if the given character can not be converted.public static char toNormalScript(char c)
c
- The character to convert.c
if the
given character was not a superscript or a subscript.Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.