FileDocCategorySizeDatePackage
AttributedCharacterIterator.javaAPI DocAndroid 1.5 API9247Wed May 06 22:41:06 BST 2009java.text

AttributedCharacterIterator

public interface AttributedCharacterIterator implements CharacterIterator
Extends the {@link CharacterIterator} interface, adding support for iterating over attributes and not only characters. An {@code AttributedCharacterIterator} also allows the user to find runs and their limits. Runs are defined as ranges of characters that all have the same attributes with the same values.
since
Android 1.0

Fields Summary
Constructors Summary
Methods Summary
public java.util.SetgetAllAttributeKeys()
Returns a set of attributes present in the {@code AttributedCharacterIterator}. An empty set is returned if no attributes were defined.

return
a set of attribute keys; may be empty.
since
Android 1.0

public java.lang.ObjectgetAttribute(java.text.AttributedCharacterIterator$Attribute attribute)
Returns the value stored in the attribute for the current character. If the attribute was not defined then {@code null} is returned.

param
attribute the attribute for which the value should be returned.
return
the value of the requested attribute for the current character or {@code null} if it was not defined.
since
Android 1.0

public java.util.MapgetAttributes()
Returns a map of all attributes of the current character. If no attributes were defined for the current character then an empty map is returned.

return
a map of all attributes for the current character or an empty map.
since
Android 1.0

public intgetRunLimit()
Returns the index of the last character in the run having the same attributes as the current character.

return
the index of the last character of the current run.
since
Android 1.0

public intgetRunLimit(java.text.AttributedCharacterIterator$Attribute attribute)
Returns the index of the last character in the run that has the same attribute value for the given attribute as the current character.

param
attribute the attribute which the run is based on.
return
the index of the last character of the current run.
since
Android 1.0

public intgetRunLimit(java.util.Set attributes)
Returns the index of the last character in the run that has the same attribute values for the attributes in the set as the current character.

param
attributes the set of attributes which the run is based on.
return
the index of the last character of the current run.
since
Android 1.0

public intgetRunStart()
Returns the index of the first character in the run that has the same attributes as the current character.

return
the index of the last character of the current run.
since
Android 1.0

public intgetRunStart(java.text.AttributedCharacterIterator$Attribute attribute)
Returns the index of the first character in the run that has the same attribute value for the given attribute as the current character.

param
attribute the attribute which the run is based on.
return
the index of the last character of the current run.
since
Android 1.0

public intgetRunStart(java.util.Set attributes)
Returns the index of the first character in the run that has the same attribute values for the attributes in the set as the current character.

param
attributes the set of attributes which the run is based on.
return
the index of the last character of the current run.
since
Android 1.0