Package com.nomagic.magicreport.engine
Class ITool.HTMLString
java.lang.Object
com.nomagic.magicreport.engine.ITool.HTMLString
- All Implemented Interfaces:
IVariable,Serializable,CharSequence
- Enclosing interface:
ITool
Direct command
IFormatter to render in HTML format.- Since:
- Sep 04, 2008
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHTMLString(CharSequence charSequence) Constructs a retained string that contains the same characters as the specified CharSequence. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) Returns thecharvalue at the specified index.booleanCompares this HTMLString to the specified object.inthashCode()Returns a hash code for this HTMLString.intlength()Returns the length of this character sequence.subSequence(int start, int end) Returns a newCharSequencethat is a subsequence of this sequence.toString()Returns a string containing the characters in this sequence in the same order as this sequence.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
HTMLString
Constructs a retained string that contains the same characters as the specified CharSequence.- Parameters:
charSequence- the sequence to copy.
-
-
Method Details
-
charAt
public char charAt(int index) Returns thecharvalue at the specified index. An index ranges from zero to length() - 1. The firstcharvalue of the sequence is at index zero, the next at index one, and so on, as for array indexing.If the
charvalue specified by the index is a surrogate, the surrogate value is returned.- Specified by:
charAtin interfaceCharSequence- Parameters:
index- the index of thecharvalue to be returned- Returns:
- the specified
charvalue - Throws:
IndexOutOfBoundsException- if the index argument is negative or not less than length()- See Also:
-
length
public int length()Returns the length of this character sequence. The length is the number of 16-bitchars in the sequence.- Specified by:
lengthin interfaceCharSequence- Returns:
- the number of
chars in this sequence - See Also:
-
subSequence
Returns a newCharSequencethat is a subsequence of this sequence. The subsequence starts with thecharvalue at the specified index and ends with thecharvalue at index end - 1. The length (inchars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.- Specified by:
subSequencein interfaceCharSequence- Parameters:
start- the start index, inclusiveend- the end index, exclusive- Returns:
- the specified subsequence
- Throws:
IndexOutOfBoundsException- if start or end are negative, if end is greater than length(), or if start is greater than end- See Also:
-
toString
Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject- Returns:
- a string consisting of exactly this sequence of characters
-
equals
Compares this HTMLString to the specified object. The result istrueif and only if the argument is notnulland is aHTMLStringobject that represents the same sequence of characters as this object. -
hashCode
public int hashCode()Returns a hash code for this HTMLString.
-