java.text
public interface AttributedCharacterIterator extends CharacterIterator
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.
Since: 1.2 1.2
Nested Class Summary | |
---|---|
static class | AttributedCharacterIterator.Attribute
Defines attribute keys that are used as text attributes. |
Method Summary | |
---|---|
Set<AttributedCharacterIterator.Attribute> | getAllAttributeKeys()
Returns a list of all keys that are defined for the
text range. |
Object | getAttribute(AttributedCharacterIterator.Attribute attrib)
Returns the value of the specified attribute for the
current character. |
Map<AttributedCharacterIterator.Attribute,Object> | getAttributes()
Returns a Map of the attributes defined for the current
character.
|
int | getRunLimit()
Returns the index of the character after the end of the run
that contains all attributes defined for the current character.
|
int | getRunLimit(Set<? extends AttributedCharacterIterator.Attribute> attribs)
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.
|
int | getRunLimit(AttributedCharacterIterator.Attribute attrib)
Returns the index of the character after the end of the run
that contains the specified attribute defined for the current character.
|
int | getRunStart()
Returns the index of the first character in the run that
contains all attributes defined for the current character.
|
int | getRunStart(Set<? extends AttributedCharacterIterator.Attribute> attribs)
Returns the index of the first character in the run that
contains all attributes in the specified Set defined for
the current character.
|
int | getRunStart(AttributedCharacterIterator.Attribute attrib)
Returns the index of the first character in the run that
contains the specified attribute defined for the current character.
|
Returns: A list of keys
null
is returned.
Parameters: attrib The attribute to retrieve the value of.
Returns: The value of the specified attribute
Map
of the attributes defined for the current
character.
Returns: A Map
of the attributes for the current character.
Returns: The end index of the run.
Set
defined
for the current character.
Parameters: attribs The Set
of attributes.
Returns: The end index of the run.
Parameters: attrib The attribute.
Returns: The end index of the run.
Returns: The start index of the run
Set
defined for
the current character.
Parameters: attribs The Set
of attributes.
Returns: The start index of the run.
Parameters: attrib The attribute.
Returns: The start index of the run.