java.text
Interface AttributedCharacterIterator

All Superinterfaces:
CharacterIterator sample code for java.text.CharacterIterator definition code for java.text.CharacterIterator , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

public interface AttributedCharacterIterator
extends CharacterIterator sample code for java.text.CharacterIterator definition code for java.text.CharacterIterator

An AttributedCharacterIterator allows iteration through both text and related attribute information.

An attribute is a key/value pair, identified by the key. No two attributes on a given character can have the same key.

The values for an attribute are immutable, or must not be mutated by clients or storage. They are always passed by reference, and not cloned.

A run with respect to an attribute is a maximum text range for which:

A run with respect to a set of attributes is a maximum text range for which this condition is met for each member attribute.

The returned indexes are limited to the range of the iterator.

The returned attribute information is limited to runs that contain the current character.

Attribute keys are instances of AttributedCharacterIterator.Attribute and its subclasses, such as java.awt.font.TextAttribute.

Since:
1.2
See Also:
AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute , TextAttribute sample code for java.awt.font.TextAttribute definition code for java.awt.font.TextAttribute , AttributedString sample code for java.text.AttributedString definition code for java.text.AttributedString , Annotation sample code for java.text.Annotation definition code for java.text.Annotation

Nested Class Summary
static class AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute
          Defines attribute keys that are used to identify text attributes.
 
Field Summary
 
Fields inherited from interface java.text.CharacterIterator sample code for java.text.CharacterIterator definition code for java.text.CharacterIterator
DONE sample code for java.text.CharacterIterator.DONE definition code for java.text.CharacterIterator.DONE
 
Method Summary
 Set sample code for java.util.Set definition code for java.util.Set <AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute > getAllAttributeKeys sample code for java.text.AttributedCharacterIterator.getAllAttributeKeys() definition code for java.text.AttributedCharacterIterator.getAllAttributeKeys() ()
          Returns the keys of all attributes defined on the iterator's text range.
 Object sample code for java.lang.Object definition code for java.lang.Object getAttribute sample code for java.text.AttributedCharacterIterator.getAttribute(java.text.AttributedCharacterIterator.Attribute) definition code for java.text.AttributedCharacterIterator.getAttribute(java.text.AttributedCharacterIterator.Attribute) (AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  attribute)
          Returns the value of the named attribute for the current character.
 Map sample code for java.util.Map definition code for java.util.Map <AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute ,Object sample code for java.lang.Object definition code for java.lang.Object > getAttributes sample code for java.text.AttributedCharacterIterator.getAttributes() definition code for java.text.AttributedCharacterIterator.getAttributes() ()
          Returns a map with the attributes defined on the current character.
 int getRunLimit sample code for java.text.AttributedCharacterIterator.getRunLimit() definition code for java.text.AttributedCharacterIterator.getRunLimit() ()
          Returns the index of the first character following the run with respect to all attributes containing the current character.
 int getRunLimit sample code for java.text.AttributedCharacterIterator.getRunLimit(java.text.AttributedCharacterIterator.Attribute) definition code for java.text.AttributedCharacterIterator.getRunLimit(java.text.AttributedCharacterIterator.Attribute) (AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  attribute)
          Returns the index of the first character following the run with respect to the given attribute containing the current character.
 int getRunLimit sample code for java.text.AttributedCharacterIterator.getRunLimit(java.util.Set) definition code for java.text.AttributedCharacterIterator.getRunLimit(java.util.Set) (Set sample code for java.util.Set definition code for java.util.Set <? extends AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute > attributes)
          Returns the index of the first character following the run with respect to the given attributes containing the current character.
 int getRunStart sample code for java.text.AttributedCharacterIterator.getRunStart() definition code for java.text.AttributedCharacterIterator.getRunStart() ()
          Returns the index of the first character of the run with respect to all attributes containing the current character.
 int getRunStart sample code for java.text.AttributedCharacterIterator.getRunStart(java.text.AttributedCharacterIterator.Attribute) definition code for java.text.AttributedCharacterIterator.getRunStart(java.text.AttributedCharacterIterator.Attribute) (AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  attribute)
          Returns the index of the first character of the run with respect to the given attribute containing the current character.
 int getRunStart sample code for java.text.AttributedCharacterIterator.getRunStart(java.util.Set) definition code for java.text.AttributedCharacterIterator.getRunStart(java.util.Set) (Set sample code for java.util.Set definition code for java.util.Set <? extends AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute > attributes)
          Returns the index of the first character of the run with respect to the given attributes containing the current character.
 
Methods inherited from interface java.text.CharacterIterator sample code for java.text.CharacterIterator definition code for java.text.CharacterIterator
clone sample code for java.text.CharacterIterator.clone() definition code for java.text.CharacterIterator.clone() , current sample code for java.text.CharacterIterator.current() definition code for java.text.CharacterIterator.current() , first sample code for java.text.CharacterIterator.first() definition code for java.text.CharacterIterator.first() , getBeginIndex sample code for java.text.CharacterIterator.getBeginIndex() definition code for java.text.CharacterIterator.getBeginIndex() , getEndIndex sample code for java.text.CharacterIterator.getEndIndex() definition code for java.text.CharacterIterator.getEndIndex() , getIndex sample code for java.text.CharacterIterator.getIndex() definition code for java.text.CharacterIterator.getIndex() , last sample code for java.text.CharacterIterator.last() definition code for java.text.CharacterIterator.last() , next sample code for java.text.CharacterIterator.next() definition code for java.text.CharacterIterator.next() , previous sample code for java.text.CharacterIterator.previous() definition code for java.text.CharacterIterator.previous() , setIndex sample code for java.text.CharacterIterator.setIndex(int) definition code for java.text.CharacterIterator.setIndex(int)
 

Method Detail

getRunStart sample code for java.text.AttributedCharacterIterator.getRunStart() definition code for java.text.AttributedCharacterIterator.getRunStart()

int getRunStart()
Returns the index of the first character of the run with respect to all attributes containing the current character.


getRunStart sample code for java.text.AttributedCharacterIterator.getRunStart(java.text.AttributedCharacterIterator.Attribute) definition code for java.text.AttributedCharacterIterator.getRunStart(java.text.AttributedCharacterIterator.Attribute)

int getRunStart(AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  attribute)
Returns the index of the first character of the run with respect to the given attribute containing the current character.


getRunStart sample code for java.text.AttributedCharacterIterator.getRunStart(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>) definition code for java.text.AttributedCharacterIterator.getRunStart(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>)

int getRunStart(Set sample code for java.util.Set definition code for java.util.Set <? extends AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute > attributes)
Returns the index of the first character of the run with respect to the given attributes containing the current character.


getRunLimit sample code for java.text.AttributedCharacterIterator.getRunLimit() definition code for java.text.AttributedCharacterIterator.getRunLimit()

int getRunLimit()
Returns the index of the first character following the run with respect to all attributes containing the current character.


getRunLimit sample code for java.text.AttributedCharacterIterator.getRunLimit(java.text.AttributedCharacterIterator.Attribute) definition code for java.text.AttributedCharacterIterator.getRunLimit(java.text.AttributedCharacterIterator.Attribute)

int getRunLimit(AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  attribute)
Returns the index of the first character following the run with respect to the given attribute containing the current character.


getRunLimit sample code for java.text.AttributedCharacterIterator.getRunLimit(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>) definition code for java.text.AttributedCharacterIterator.getRunLimit(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>)

int getRunLimit(Set sample code for java.util.Set definition code for java.util.Set <? extends AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute > attributes)
Returns the index of the first character following the run with respect to the given attributes containing the current character.


getAttributes sample code for java.text.AttributedCharacterIterator.getAttributes() definition code for java.text.AttributedCharacterIterator.getAttributes()

Map sample code for java.util.Map definition code for java.util.Map <AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute ,Object sample code for java.lang.Object definition code for java.lang.Object > getAttributes()
Returns a map with the attributes defined on the current character.


getAttribute sample code for java.text.AttributedCharacterIterator.getAttribute(java.text.AttributedCharacterIterator.Attribute) definition code for java.text.AttributedCharacterIterator.getAttribute(java.text.AttributedCharacterIterator.Attribute)

Object sample code for java.lang.Object definition code for java.lang.Object  getAttribute(AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  attribute)
Returns the value of the named attribute for the current character. Returns null if the attribute is not defined.

Parameters:
attribute - the key of the attribute whose value is requested.

getAllAttributeKeys sample code for java.text.AttributedCharacterIterator.getAllAttributeKeys() definition code for java.text.AttributedCharacterIterator.getAllAttributeKeys()

Set sample code for java.util.Set definition code for java.util.Set <AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute > getAllAttributeKeys()
Returns the keys of all attributes defined on the iterator's text range. The set is empty if no attributes are defined.