public class QuoteType extends Object
Represents quote characters - single quote (') and double quote (")
| Modifier and Type | Field and Description |
|---|---|
static QuoteType |
DoubleQuote
Double quote (U+0022 QUOTATION MARK character)
|
static QuoteType |
SingleQuote
Single quote (U+0027 APOSTROPHE character)
|
| Constructor and Description |
|---|
QuoteType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Indicates whether this instance of the quote type is equal to specified uncasted
|
boolean |
equals(QuoteType other)
Indicates whether this instance of the quote type is equal to specified
|
char |
getCharacter()
Character to enquote
|
int |
getCode()
Code point of the current character (U+0027 or U+0022)
|
String |
getHtmlEncoded()
HTML-encoded character
|
int |
hashCode()
Returns a hash-code for this character
|
static boolean |
op_Equality(QuoteType first,
QuoteType second)
Checks whether two "QuoteType" values are equal
|
static boolean |
op_Inequality(QuoteType first,
QuoteType second)
Checks whether two "QuoteType" values are not equal
|
static char |
to_Char(QuoteType quote)
Casts specified
QuoteType instance to the char |
static QuoteType |
to_QuoteType(char character)
Casts specific
char to the corresponding QuoteType, throws exception if casting is invalid |
String |
toString()
Returns a "SingleQuote" or "DoubleQuote" string depending on the current value
|
public static final QuoteType DoubleQuote
Double quote (U+0022 QUOTATION MARK character)
public static final QuoteType SingleQuote
Single quote (U+0027 APOSTROPHE character)
public boolean equals(Object obj)
Indicates whether this instance of the quote type is equal to specified uncasted
public final boolean equals(QuoteType other)
Indicates whether this instance of the quote type is equal to specified
other - Other instance of QuoteType to checkpublic final char getCharacter()
Character to enquote
public final int getCode()
Code point of the current character (U+0027 or U+0022)
public final String getHtmlEncoded()
HTML-encoded character
public int hashCode()
Returns a hash-code for this character
public static boolean op_Equality(QuoteType first, QuoteType second)
Checks whether two "QuoteType" values are equal
first - First value to checksecond - Second value to checkpublic static boolean op_Inequality(QuoteType first, QuoteType second)
Checks whether two "QuoteType" values are not equal
first - First value to checksecond - Second value to checkpublic static char to_Char(QuoteType quote)
Casts specified QuoteType instance to the char
quote - Quote type instance to castpublic static QuoteType to_QuoteType(char character)
Casts specific char to the corresponding QuoteType, throws exception if casting is invalid
character - A single quote (U+0027 APOSTROPHE) or double quote (U+0022 QUOTATION MARK) character. Exception will be thrown if any other character will be specified.IllegalArgumentException - Specified char is not either a quotation mark or apostropheCopyright © 2024. All rights reserved.