|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Textual
Represents an object that is mainly for storing "text". It is usually implemented by a class that also implements Item.
A "text" is usually a string (e.g., Text, Comment and CDATA) but could be any object (e.g., Binary).
The getText method of some parent, e.g., Element, concatenates the text of its children if they implement this interface and Textual.isPartOfParentText returns true.
Note: the class that implement this interface must have a constructor with a single argument whose type is String. The split method will invoke it to create a new instance.
Item
Method Summary | |
---|---|
boolean |
isCoalesceable()
Returns true if this textual object is allowed to be coalesced with its siblings with the same type (class). |
boolean |
isPartOfParentText()
Returns true if this textual object is part of the parent's text. |
Textual |
split(int offset)
Splits at the specified offset into two Textual objects. |
Method Detail |
---|
Textual split(int offset)
boolean isPartOfParentText()
boolean isCoalesceable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |