Interface UCaseProps.ContextIterator

All Known Implementing Classes:
CaseMapImpl.StringContextIterator, ReplaceableContextIterator
Enclosing class:
UCaseProps

public static interface UCaseProps.ContextIterator
Iterator for string case mappings, which need to look at the context (surrounding text) of a given character for conditional mappings. The iterator only needs to go backward or forward away from the character in question. It does not use any indexes on this interface. It does not support random access or an arbitrary change of iteration direction. The code point being case-mapped itself is never returned by this iterator.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Iterate and return the next code point, moving in the direction determined by the reset() call.
    void
    reset(int dir)
    Reset the iterator for forward or backward iteration.
  • Method Details

    • reset

      void reset(int dir)
      Reset the iterator for forward or backward iteration.
      Parameters:
      dir - >0: Begin iterating forward from the first code point after the one that is being case-mapped. <0: Begin iterating backward from the first code point before the one that is being case-mapped.
    • next

      int next()
      Iterate and return the next code point, moving in the direction determined by the reset() call.
      Returns:
      Next code point, or <0 when the iteration is done.