-
- All Implemented Interfaces:
-
android.os.Parcelable,org.readium.r2.shared.JSONable
public final class DomRange.Point implements JSONable, Parcelable
A serializable representation of a boundary point in a DOM Range.
The cssSelector field always references a DOM element. If the original DOM Range start/endContainer property references a DOM text node, the textNodeIndex field is used to complement the CSS Selector; thereby providing a pointer to a child DOM text node; and charOffset is used to tell a position within the character data of that DOM text node (just as the DOM Range start/endOffset does). If the original DOM Range start/endContainer property references a DOM Element, then the textNodeIndex field is used to designate the child Text node (just as the DOM Range start/endOffset does), and the optional charOffset field is not used (as there is no explicit position within the character data of the text node).
https://github.com/readium/architecture/blob/master/models/locators/extensions/html.md#the-start-and-end-object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDomRange.Point.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Longoffsetprivate final StringcssSelectorprivate final IntegertextNodeIndexprivate final IntegercharOffset
-
Constructor Summary
Constructors Constructor Description DomRange.Point(String cssSelector, Integer textNodeIndex, Integer charOffset)
-
Method Summary
Modifier and Type Method Description final LonggetOffset()final StringgetCssSelector()final IntegergetTextNodeIndex()final IntegergetCharOffset()JSONObjecttoJSON()Serializes the object to its JSON representation. -
-
Method Detail
-
getCssSelector
final String getCssSelector()
-
getTextNodeIndex
final Integer getTextNodeIndex()
-
getCharOffset
final Integer getCharOffset()
-
toJSON
JSONObject toJSON()
Serializes the object to its JSON representation.
-
-
-
-