Code example for AttributedString

Methods: addAttribute

0
            new HashSet<AttributedCharacterIterator.Attribute>();
        attr.add(AttributedCharacterIterator.Attribute.LANGUAGE);
        assertEquals("non-null value limit",
                2, it.getRunLimit(attr));
 
        as = new AttributedString("test");
        as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, null,
                2, 3); 
        it = as.getIterator();
        assertEquals("null value limit",
                4, it.getRunLimit(attr));
 
        attr.add(AttributedCharacterIterator.Attribute.READING);
        assertEquals("null value limit",
                4, it.getRunLimit(attr));
    } 
 
    public void test_getAllAttributeKeys() { 
        AttributedString as = new AttributedString("test");
        AttributedCharacterIterator it = as.getIterator();
Contextual code suggestions in your IDE  Get Codota for Java