Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.text
Interface CharacterIterator

All Superinterfaces:
Cloneable
All Known Subinterfaces:
AttributedCharacterIterator

public interface CharacterIterator
extends Cloneable

CharacterIterator is used to sequence over a group of characters. The iteration starts at the begin index in the group of character and continues to one index before the end index.


Field Summary
static char DONE
          A constant which indicates there is no character.
 
Method Summary
 java.lang.Object clone()
          Answers a new CharacterIterator with the same properties.
 char current()
          Answers the character at the current index.
 char first()
          Sets the current position to the begin index and answers the character at the begin index.
 int getBeginIndex()
          Answers the begin index.
 int getEndIndex()
          Answers the end index.
 int getIndex()
          Answers the current index.
 char last()
          Sets the current position to the end index - 1 and answers the character at the current position.
 char next()
          Increments the current index and returns the character at the new index.
 char previous()
          Decrements the current index and returns the character at the new index.
 char setIndex(int location)
          Sets the current index.
 

Field Detail

DONE

static final char DONE
A constant which indicates there is no character.

See Also:
Constant Field Values
Method Detail

clone

java.lang.Object clone()
Answers a new CharacterIterator with the same properties.

Returns:
a shallow copy of this CharacterIterator
See Also:
Cloneable

current

char current()
Answers the character at the current index.

Returns:
the current character, or DONE if the current index is past the end

first

char first()
Sets the current position to the begin index and answers the character at the begin index.

Returns:
the character at the begin index

getBeginIndex

int getBeginIndex()
Answers the begin index.

Returns:
the index of the first character to iterate

getEndIndex

int getEndIndex()
Answers the end index.

Returns:
the index one past the last character to iterate

getIndex

int getIndex()
Answers the current index.

Returns:
the current index

last

char last()
Sets the current position to the end index - 1 and answers the character at the current position.

Returns:
the character before the end index

next

char next()
Increments the current index and returns the character at the new index.

Returns:
the character at the next index, or DONE if the next index is past the end

previous

char previous()
Decrements the current index and returns the character at the new index.

Returns:
the character at the previous index, or DONE if the previous index is past the beginning

setIndex

char setIndex(int location)
Sets the current index.

Returns:
the character at the new index, or DONE if the index is past the end
Throws:
java.lang.IllegalArgumentException - when the new index is less than the begin index or greater than the end index

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.