Build 1.0_r1(from source)

java.text
Class AttributedString.AttributedIterator

java.lang.Object
  extended by java.text.AttributedString.AttributedIterator
All Implemented Interfaces:
Cloneable, AttributedCharacterIterator, CharacterIterator
Enclosing class:
AttributedString

static class AttributedString.AttributedIterator
extends Object
implements AttributedCharacterIterator


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.text.AttributedCharacterIterator
AttributedCharacterIterator.Attribute
 
Field Summary
 
Fields inherited from interface java.text.CharacterIterator
DONE
 
Constructor Summary
AttributedString.AttributedIterator(AttributedString attrString)
           
AttributedString.AttributedIterator(AttributedString attrString, AttributedCharacterIterator.Attribute[] attributes, int begin, int end)
           
 
Method Summary
 Object clone()
          Returns a new StringCharacterIterator with the same source String, begin, end, and current index as this StringCharacterIterator.
 char current()
          Returns the character at the current index in the source String.
 char first()
          Sets the current position to the begin index and returns the character at the begin index.
 Set<AttributedCharacterIterator.Attribute> getAllAttributeKeys()
           
 Object getAttribute(AttributedCharacterIterator.Attribute attribute)
           
 Map<AttributedCharacterIterator.Attribute,Object> getAttributes()
           
 int getBeginIndex()
          Returns the begin index in the source String.
 int getEndIndex()
          Returns the end index in the source String.
 int getIndex()
          Returns the current index in the source String.
 int getRunLimit()
           
 int getRunLimit(AttributedCharacterIterator.Attribute attribute)
           
 int getRunLimit(Set<? extends AttributedCharacterIterator.Attribute> attributes)
           
 int getRunStart()
           
 int getRunStart(AttributedCharacterIterator.Attribute attribute)
           
 int getRunStart(Set<? extends AttributedCharacterIterator.Attribute> attributes)
           
 char last()
          Sets the current position to the end index - 1 and returns 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 in the source String.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributedString.AttributedIterator

AttributedString.AttributedIterator(AttributedString attrString)

AttributedString.AttributedIterator

AttributedString.AttributedIterator(AttributedString attrString,
                                    AttributedCharacterIterator.Attribute[] attributes,
                                    int begin,
                                    int end)
Method Detail

clone

public Object clone()
Returns a new StringCharacterIterator with the same source String, begin, end, and current index as this StringCharacterIterator.

Specified by:
clone in interface CharacterIterator
Overrides:
clone in class Object
Returns:
a shallow copy of this StringCharacterIterator
See Also:
Cloneable

current

public char current()
Returns the character at the current index in the source String.

Specified by:
current in interface CharacterIterator
Returns:
the current character, or DONE if the current index is past the end

first

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

Specified by:
first in interface CharacterIterator
Returns:
the character at the begin index

getBeginIndex

public int getBeginIndex()
Returns the begin index in the source String.

Specified by:
getBeginIndex in interface CharacterIterator
Returns:
the index of the first character to iterate

getEndIndex

public int getEndIndex()
Returns the end index in the source String.

Specified by:
getEndIndex in interface CharacterIterator
Returns:
the index one past the last character to iterate

getIndex

public int getIndex()
Returns the current index in the source String.

Specified by:
getIndex in interface CharacterIterator
Returns:
the current index

getAllAttributeKeys

public Set<AttributedCharacterIterator.Attribute> getAllAttributeKeys()
Specified by:
getAllAttributeKeys in interface AttributedCharacterIterator

getAttribute

public Object getAttribute(AttributedCharacterIterator.Attribute attribute)
Specified by:
getAttribute in interface AttributedCharacterIterator

getAttributes

public Map<AttributedCharacterIterator.Attribute,Object> getAttributes()
Specified by:
getAttributes in interface AttributedCharacterIterator

getRunLimit

public int getRunLimit()
Specified by:
getRunLimit in interface AttributedCharacterIterator

getRunLimit

public int getRunLimit(AttributedCharacterIterator.Attribute attribute)
Specified by:
getRunLimit in interface AttributedCharacterIterator

getRunLimit

public int getRunLimit(Set<? extends AttributedCharacterIterator.Attribute> attributes)
Specified by:
getRunLimit in interface AttributedCharacterIterator

getRunStart

public int getRunStart()
Specified by:
getRunStart in interface AttributedCharacterIterator

getRunStart

public int getRunStart(AttributedCharacterIterator.Attribute attribute)
Specified by:
getRunStart in interface AttributedCharacterIterator

getRunStart

public int getRunStart(Set<? extends AttributedCharacterIterator.Attribute> attributes)
Specified by:
getRunStart in interface AttributedCharacterIterator

last

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

Specified by:
last in interface CharacterIterator
Returns:
the character before the end index

next

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

Specified by:
next in interface CharacterIterator
Returns:
the character at the next index, or DONE if the next index is past the end

previous

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

Specified by:
previous in interface CharacterIterator
Returns:
the character at the previous index, or DONE if the previous index is past the beginning

setIndex

public char setIndex(int location)
Sets the current index in the source String.

Specified by:
setIndex in interface CharacterIterator
Parameters:
location - The index the CharacterIterator is set to.
Returns:
the character at the new index, or DONE if the index is past the end
Throws:
IllegalArgumentException - when the new index is less than the begin index or greater than the end index

Build 1.0_r1(from source)

Please submit a feedback, bug or feature