58 |
public interface AttributedCharacterIterator extends CharacterIterator |
public interface AttributedCharacterIterator extends CharacterIterator |
59 |
{ |
{ |
60 |
/** |
/** |
61 |
* This class defines attribute keys that are used as text attributes. |
* Defines attribute keys that are used as text attributes. |
62 |
*/ |
*/ |
63 |
public static class Attribute implements Serializable |
public static class Attribute implements Serializable |
64 |
{ |
{ |
88 |
new Attribute ("INPUT_METHOD_SEGMENT"); |
new Attribute ("INPUT_METHOD_SEGMENT"); |
89 |
|
|
90 |
/** |
/** |
91 |
* This is the name of the attribute key |
* The name of the attribute key |
92 |
* @serial |
* @serial |
93 |
*/ |
*/ |
94 |
private String name; |
private String name; |
95 |
|
|
96 |
/** |
/** |
97 |
* This method initializes a new instance of this class with the specified |
* Initializes a new instance of this class with the specified name. |
|
* name. |
|
98 |
* |
* |
99 |
* @param name The name of this attribute key. |
* @param name The name of this attribute key. |
100 |
*/ |
*/ |
104 |
} |
} |
105 |
|
|
106 |
/** |
/** |
107 |
* This method returns the name of this attribute. |
* Returns the name of this attribute. |
108 |
* |
* |
109 |
* @return The attribute name |
* @return The attribute name |
110 |
*/ |
*/ |
114 |
} |
} |
115 |
|
|
116 |
/** |
/** |
117 |
* This method resolves an instance of |
* Resolves an instance of |
118 |
* <code>AttributedCharacterIterator.Attribute</code> |
* <code>AttributedCharacterIterator.Attribute</code> |
119 |
* that is being deserialized to one of the three pre-defined attribute |
* that is being deserialized to one of the three pre-defined attribute |
120 |
* constants. It does this by comparing the names of the attributes. The |
* constants. It does this by comparing the names of the attributes. The |
141 |
} |
} |
142 |
|
|
143 |
/** |
/** |
144 |
* This method tests this object for equality against the specified object. |
* Tests this object for equality against the specified object. |
145 |
* The two objects will be considered equal if and only if: |
* The two objects will be considered equal if and only if: |
146 |
* <ul> |
* <ul> |
147 |
* <li>The specified object is not <code>null</code>. |
* <li>The specified object is not <code>null</code>. |
165 |
} |
} |
166 |
|
|
167 |
/** |
/** |
168 |
* This method returns a hash value for this object. |
* Returns a hash value for this object. |
169 |
* |
* |
170 |
* @return A hash value for this object. |
* @return A hash value for this object. |
171 |
*/ |
*/ |
175 |
} |
} |
176 |
|
|
177 |
/** |
/** |
178 |
* This method returns a <code>String</code> representation of this object. |
* Returns a <code>String</code> representation of this object. |
179 |
* |
* |
180 |
* @return A <code>String</code> representation of this object. |
* @return A <code>String</code> representation of this object. |
181 |
*/ |
*/ |
187 |
} // Inner class Attribute |
} // Inner class Attribute |
188 |
|
|
189 |
/** |
/** |
190 |
* This method returns a list of all keys that are defined for the |
* Returns a list of all keys that are defined for the |
191 |
* text range. This can be an empty list if no attributes are defined. |
* text range. This can be an empty list if no attributes are defined. |
192 |
* |
* |
193 |
* @return A list of keys |
* @return A list of keys |
195 |
Set getAllAttributeKeys(); |
Set getAllAttributeKeys(); |
196 |
|
|
197 |
/** |
/** |
198 |
* This method returns a <code>Map</code> of the attributed defined for |
* Returns a <code>Map</code> of the attributes defined for the current |
199 |
* the current character. |
* character. |
200 |
* |
* |
201 |
* @return A <code>Map</code> of the attributes for the current character. |
* @return A <code>Map</code> of the attributes for the current character. |
202 |
*/ |
*/ |
203 |
Map getAttributes(); |
Map getAttributes(); |
204 |
|
|
205 |
/** |
/** |
206 |
* This method returns the value of the specified attribute for the |
* Returns the value of the specified attribute for the |
207 |
* current character. If the attribute is not defined for the current |
* current character. If the attribute is not defined for the current |
208 |
* character, <code>null</code> is returned. |
* character, <code>null</code> is returned. |
209 |
* |
* |
214 |
Object getAttribute (AttributedCharacterIterator.Attribute attrib); |
Object getAttribute (AttributedCharacterIterator.Attribute attrib); |
215 |
|
|
216 |
/** |
/** |
217 |
* This method returns the index of the first character in the run that |
* Returns the index of the first character in the run that |
218 |
* contains all attributes defined for the current character. |
* contains all attributes defined for the current character. |
219 |
* |
* |
220 |
* @return The start index of the run |
* @return The start index of the run |
222 |
int getRunStart(); |
int getRunStart(); |
223 |
|
|
224 |
/** |
/** |
225 |
* This method returns the index of the first character in the run that |
* Returns the index of the first character in the run that |
226 |
* contains all attributes in the specified <code>Set</code> defined for |
* contains all attributes in the specified <code>Set</code> defined for |
227 |
* the current character. |
* the current character. |
228 |
* |
* |
233 |
int getRunStart (Set attribs); |
int getRunStart (Set attribs); |
234 |
|
|
235 |
/** |
/** |
236 |
* This method returns the index of the first character in the run that |
* Returns the index of the first character in the run that |
237 |
* contains the specified attribute defined for the current character. |
* contains the specified attribute defined for the current character. |
238 |
* |
* |
239 |
* @param attrib The attribute. |
* @param attrib The attribute. |
243 |
int getRunStart (AttributedCharacterIterator.Attribute attrib); |
int getRunStart (AttributedCharacterIterator.Attribute attrib); |
244 |
|
|
245 |
/** |
/** |
246 |
* This method returns the index of the character after the end of the run |
* Returns the index of the character after the end of the run |
247 |
* that contains all attributed defined for the current character. |
* that contains all attributes defined for the current character. |
248 |
* |
* |
249 |
* @return The end index of the run. |
* @return The end index of the run. |
250 |
*/ |
*/ |
251 |
int getRunLimit(); |
int getRunLimit(); |
252 |
|
|
253 |
/** |
/** |
254 |
* This method returns the index of the character after the end of the run |
* Returns the index of the character after the end of the run |
255 |
* that contains all attributes in the specified <code>Set</code> defined |
* that contains all attributes in the specified <code>Set</code> defined |
256 |
* for the current character. |
* for the current character. |
257 |
* |
* |
262 |
int getRunLimit (Set attribs); |
int getRunLimit (Set attribs); |
263 |
|
|
264 |
/** |
/** |
265 |
* This methods returns the index of the character after the end of the run |
* Returns the index of the character after the end of the run |
266 |
* that contains the specified attribute defined for the current character. |
* that contains the specified attribute defined for the current character. |
267 |
* |
* |
268 |
* @param attrib The attribute. |
* @param attrib The attribute. |