[multiple changes]
2004-03-11 Dalibor Topic <robilad@kaffe.org> * java/text/AttributedString.java (addAttribute(AttributedCharacterIterator.Attribute,Object,int,int)): Use HashMap instead of Hashtable since value can be null, and you can not store a null value in a Hashtable. 2004-03-11 Guilhem Lavaux <guilhem@kaffe.org> * java/text/AttributedStringIterator.java (getAllAttributesKey): Return only keys concerned by the current iterator. (getAttributes): Use strict inequality for end_index. From-SVN: r79329
This commit is contained in:
parent
c21a266bf2
commit
1ce9c63d50
3 changed files with 28 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
/* AttributedString.java -- Models text with attributes
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -39,6 +39,7 @@ exception statement from your version. */
|
|||
package java.text;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
@ -329,7 +330,7 @@ addAttribute(AttributedCharacterIterator.Attribute attrib, Object value)
|
|||
* of the string.
|
||||
*
|
||||
* @param attrib The attribute to add.
|
||||
* @param value The value of the attribute.
|
||||
* @param value The value of the attribute, which may be null.
|
||||
* @param begin_index The beginning index of the subrange.
|
||||
* @param end_index The ending index of the subrange.
|
||||
*
|
||||
|
@ -342,10 +343,10 @@ addAttribute(AttributedCharacterIterator.Attribute attrib, Object value,
|
|||
if (attrib == null)
|
||||
throw new IllegalArgumentException("null attribute");
|
||||
|
||||
Hashtable ht = new Hashtable();
|
||||
ht.put(attrib, value);
|
||||
HashMap hm = new HashMap();
|
||||
hm.put(attrib, value);
|
||||
|
||||
addAttributes(ht, begin_index, end_index);
|
||||
addAttributes(hm, begin_index, end_index);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue