/* StringFormatBuffer.java -- Implements FormatBuffer using StringBuffer.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.java.text;
import java.text.AttributedCharacterIterator;
-import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static java.text.AttributedCharacterIterator.Attribute;
/**
* This class is an implementation of a FormatBuffer without attributes.
public class StringFormatBuffer implements FormatBuffer
{
private final StringBuffer buffer;
- private AttributedCharacterIterator.Attribute defaultAttr;
+ private Attribute defaultAttr;
public StringFormatBuffer(int prebuffer)
{
buffer.append(s);
}
- public void append(String s, AttributedCharacterIterator.Attribute attr)
+ public void append(String s, Attribute attr)
{
buffer.append(s);
}
- public void append(String s, int[] ranges, HashMap[] attrs)
+ public void append(String s, int[] ranges, List<Map<Attribute,Object>> attrs)
{
buffer.append(s);
}
buffer.append(c);
}
- public void append(char c, AttributedCharacterIterator.Attribute attr)
+ public void append(char c, Attribute attr)
{
buffer.append(c);
}
- public void setDefaultAttribute(AttributedCharacterIterator.Attribute attr)
+ public void setDefaultAttribute(Attribute attr)
{
defaultAttr = attr;
}
- public AttributedCharacterIterator.Attribute getDefaultAttribute()
+ public Attribute getDefaultAttribute()
{
return defaultAttr;
}