QuoteType
Inheritance: java.lang.Object
public class QuoteType
Represents quote characters - single quote (’) and double quote (")
Constructors
Constructor | Description |
---|---|
QuoteType() |
Fields
Field | Description |
---|---|
SingleQuote | Single quote (U+0027 APOSTROPHE character) |
DoubleQuote | Double quote (U+0022 QUOTATION MARK character) |
Methods
Method | Description |
---|---|
getCode() | Code point of the current character (U+0027 or U+0022) |
getCharacter() | Character to enquote |
getHtmlEncoded() | HTML-encoded character |
toString() | Returns a “SingleQuote” or “DoubleQuote” string depending on the current value |
equals(QuoteType other) | Indicates whether this instance of the quote type is equal to specified |
equals(Object obj) | Indicates whether this instance of the quote type is equal to specified uncasted |
hashCode() | Returns a hash-code for this character |
op_Equality(QuoteType first, QuoteType second) | Checks whether two “QuoteType” values are equal |
op_Inequality(QuoteType first, QuoteType second) | Checks whether two “QuoteType” values are not equal |
to_Char(QuoteType quote) | Casts specified QuoteType instance to the char |
to_QuoteType(char character) | Casts specific char to the corresponding QuoteType, throws exception if casting is invalid |
QuoteType()
public QuoteType()
SingleQuote
public static final QuoteType SingleQuote
Single quote (U+0027 APOSTROPHE character)
DoubleQuote
public static final QuoteType DoubleQuote
Double quote (U+0022 QUOTATION MARK character)
getCode()
public final int getCode()
Code point of the current character (U+0027 or U+0022)
Returns: int
getCharacter()
public final char getCharacter()
Character to enquote
Returns: char
getHtmlEncoded()
public final String getHtmlEncoded()
HTML-encoded character
Returns: java.lang.String
toString()
public String toString()
Returns a “SingleQuote” or “DoubleQuote” string depending on the current value
Returns: java.lang.String -
equals(QuoteType other)
public final boolean equals(QuoteType other)
Indicates whether this instance of the quote type is equal to specified
Parameters:
Parameter | Type | Description |
---|---|---|
other | QuoteType | Other instance of QuoteType to check |
Returns: boolean - true if are equal, false if are unequal
equals(Object obj)
public boolean equals(Object obj)
Indicates whether this instance of the quote type is equal to specified uncasted
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | Uncasted object, expected to be of QuoteType type |
Returns: boolean - true if are equal, false if are unequal
hashCode()
public int hashCode()
Returns a hash-code for this character
Returns: int - Hash-code as an signed integer
op_Equality(QuoteType first, QuoteType second)
public static boolean op_Equality(QuoteType first, QuoteType second)
Checks whether two “QuoteType” values are equal
Parameters:
Parameter | Type | Description |
---|---|---|
first | QuoteType | First value to check |
second | QuoteType | Second value to check |
Returns: boolean - true if are equal, false otherwise
op_Inequality(QuoteType first, QuoteType second)
public static boolean op_Inequality(QuoteType first, QuoteType second)
Checks whether two “QuoteType” values are not equal
Parameters:
Parameter | Type | Description |
---|---|---|
first | QuoteType | First value to check |
second | QuoteType | Second value to check |
Returns: boolean - false if are equal, true otherwise
to_Char(QuoteType quote)
public static char to_Char(QuoteType quote)
Casts specified QuoteType instance to the char
Parameters:
Parameter | Type | Description |
---|---|---|
quote | QuoteType | Quote type instance to cast |
Returns: char
to_QuoteType(char character)
public static QuoteType to_QuoteType(char character)
Casts specific char to the corresponding QuoteType, throws exception if casting is invalid
Parameters:
Parameter | Type | Description |
---|---|---|
character | char | 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. |
Returns: QuoteType