java.text
Interface AttributedCharacterIterator
java.lang.Object
|
+--java.lang.Cloneable
|
+--java.text.CharacterIterator
|
+--java.text.AttributedCharacterIterator
All Implemented Interfaces:
CharacterIterator, Cloneable
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:- Aaron M. Renn (arenn@urbanophile.com)
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:
- The value of the specified attribute
getAttributes
public Map getAttributes()
This method returns a Map
of the attributed defined for
the current character.
Returns:
- A
Map
of the attributes for the current character.
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:
- The end index of the run.
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:
- The end index of the run.
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:
- The end index of the run.
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:
- The start index of the run
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:
- The start index of the run.
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:
- The start index of the run.
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.