Programmer Reference : Unicode Support : UnicodeViewPosition
UnicodeViewPosition
Description
A <UnicodeViewPosition> is an object that captures the position of a particular <UnicodeView>.
It is often the case that these positions in Unicode Views can not be accessed in constant time since a position in the view may not be the same as its position in the backing storage.
This object captures the necessary state in order to restore a positional cursor to a particular position in constant time, as well as access an element as a particular index in constant time.
For more information, @see Class Comments of <UnicodeView>. Usage of positions is shown in the POSITIONS section.
Instance State
value: <Integer> position or index within the stream of elements. 0 <= position <= stream size
bookmark - <Object> private information to help the vm reposition within the backing storage.
aux": <Object> private information to help the vm reconstitute additional state that might be required at a position. For example, in UTF16, it may need to store the last surrogate pair.
Class Methods
None
Instance Methods
=
  Answer a Boolean indicating true if the
     receiver's position and encoded position
     is equal to aViewPosition. Answer false otherwise.

     Arguments:
        anObject - <Object>
     Answers:
        <Boolean>
asInteger
  Answer the position object as an Integer

     Answers:
        <Integer>
value
  Answer an Integer representing the position of access for the receiver.

     Answers:
        <Integer>
Last modified date: 04/20/2022