Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.text

Interface AttributedCharacterIterator

java.lang.Object
|
+--java.lang.Cloneable
   |
   +--java.text.CharacterIterator
      |
      +--java.text.AttributedCharacterIterator

All Implemented Interfaces:

CharacterIterator, Cloneable


public interface AttributedCharacterIterator

implements CharacterIterator

This interface extends the CharacterIterator interface in order to support iteration over character attributes as well as over the characters themselves.

In addition to attributes of specific characters, this interface supports the concept of the "attribute run", which is an attribute that is defined for a particular value across an entire range of characters or which is undefined over a range of characters.

Author:

Method Summary

java.util.SetgetAllAttributeKeys()

This method returns a list of all keys that are defined for the text range.
java.lang.ObjectgetAttribute(java.text.AttributedCharacterIterator.Attribute attrib)

This method returns the value of the specified attribute for the current character.
java.util.MapgetAttributes()

This method returns a Map of the attributed defined for the current character.
intgetRunLimit()

This method returns the index of the character after the end of the run that contains all attributed defined for the current character.
intgetRunLimit(java.util.Set attribs)

This method returns the index of the character after the end of the run that contains all attributes in the specified Set defined for the current character.
intgetRunLimit(java.text.AttributedCharacterIterator.Attribute attrib)

This methods returns the index of the character after the end of the run that contains the specified attribute defined for the current character.
intgetRunStart()

This method returns the index of the first character in the run that contains all attributes defined for the current character.
intgetRunStart(java.util.Set attribs)

This method returns the index of the first character in the run that contains all attributes in the specified Set defined for the current character.
intgetRunStart(java.text.AttributedCharacterIterator.Attribute attrib)

This method returns the index of the first character in the run that contains the specified attribute defined for the current character.

Method Details

getAllAttributeKeys

public Set getAllAttributeKeys()

This method returns a list of all keys that are defined for the text range. This can be an empty list if no attributes are defined.

Returns:


getAttribute

public Object getAttribute(java.text.AttributedCharacterIterator.Attribute attrib)

This method returns the value of the specified attribute for the current character. If the attribute is not defined for the current character, null is returned.

Parameters:

Returns:


getAttributes

public Map getAttributes()

This method returns a Map of the attributed defined for the current character.

Returns:


getRunLimit

public int getRunLimit()

This method returns the index of the character after the end of the run that contains all attributed defined for the current character.

Returns:


getRunLimit

public int getRunLimit(java.text.AttributedCharacterIterator.Attribute attrib)

This methods returns the index of the character after the end of the run that contains the specified attribute defined for the current character.

Parameters:

Returns:


getRunLimit

public int getRunLimit(java.util.Set attribs)

This method returns the index of the character after the end of the run that contains all attributes in the specified Set defined for the current character.

Parameters:

Returns:


getRunStart

public int getRunStart()

This method returns the index of the first character in the run that contains all attributes defined for the current character.

Returns:


getRunStart

public int getRunStart(java.text.AttributedCharacterIterator.Attribute attrib)

This method returns the index of the first character in the run that contains the specified attribute defined for the current character.

Parameters:

Returns:


getRunStart

public int getRunStart(java.util.Set attribs)

This method returns the index of the first character in the run that contains all attributes in the specified Set defined for the current character.

Parameters:

Returns: