Class FormattedCharacterIterator

java.lang.Object
org.apache.sis.internal.util.SimpleCharacterIterator
org.apache.sis.measure.FormattedCharacterIterator
All Implemented Interfaces:
Serializable, CharSequence, Cloneable, AttributedCharacterIterator, CharacterIterator

final class FormattedCharacterIterator extends SimpleCharacterIterator implements AttributedCharacterIterator
The attributed character iterator to be returned by Format implementations in the org.apache.sis.measure package.

Implementation assumption

Every getRunStart(…) and getRunLimit(…) methods defined in this class check only for attribute existence, ignoring the actual attribute value. This is a departure from the AttributedCharacterIterator contract, but should be invisible to the users if there are no juxtaposed fields with the same attribute value (which is usually the case). A violation occurs if different fields are formatted without separator. For example if an angle is formatted as "DDMMSS" without any field separator, then we have 3 juxtaposed integer fields. If those fields have the same value, then the whole "DDMMSS" text should be seen as a single run according the AttributedCharacterIterator contract, while they will still been seen as 3 separated fields by this implementation.
Since:
0.3
Version:
0.3