I have been reading up on the docs for the Spanned/Spannable class for a project that I am working on. I have been puzzled by the definition and usage of the spans that contain MARK
and POINT
.
A MARK
seems to be defined in the Doc as "attached" to a character's location while a POINT
is defined as being "glued" to a character. Thus a MARK
won't move when text is changed and a POINT
will move with the character it was "glued" to when text is changed.
These definitions seem to show that MARK
is synonymous with INCLUSIVE
and that POINT
is synonymous with EXCLUSIVE
.
However, this is not the case as neither SPAN_MARK_MARK
nor SPAN_POINT_POINT
are synonymous with either SPAN_INCLUSIVE_INCLUSIVE
or SPAN_EXCLUSIVE_EXCLUSIVE
. In fact, SPAN_INCLUSIVE_INCLUSIVE
is the same as SPAN_MARK_POINT
and SPAN_POINT_MARK
is the same as SPAN_EXCLUSIVE_EXCLUSIVE
.
My questions are as follows
Why is
SPAN_POINT_MARK
synonymous withSPAN_EXCLUSIVE_EXCLUSIVE
? and why isSPAN_MARK_POINT
synonymous withSPAN_INCLUSIVE_INCLUSIVE
?Why aren't
SPAN_MARK_MARK
andSPAN_POINT_POINT
synonymous withSPAN_INCLUSIVE_INCLUSIVE
andSPAN_EXCLUSIVE_EXCLUSIVE
respectively?What are the true definitions of
MARK
andPOINT
in this usage?