Package org.daisy.dotify.api.translator
Class DefaultTextAttribute
- java.lang.Object
-
- org.daisy.dotify.api.translator.DefaultTextAttribute
-
- All Implemented Interfaces:
Iterable<TextAttribute>,TextAttribute
public class DefaultTextAttribute extends Object implements TextAttribute
Provides a default implementation of text attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultTextAttribute.BuilderProvides a builder for a default text attribute
-
Field Summary
Fields Modifier and Type Field Description protected intlength
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultTextAttribute(int length, DefaultTextAttribute.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDictionaryIdentifier()Gets the dictionary identifier that applies to this text attribute.intgetWidth()Gets the width of this objectbooleanhasChildren()Returns true if this object has text attribute children.Iterator<TextAttribute>iterator()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DefaultTextAttribute
protected DefaultTextAttribute(int length, DefaultTextAttribute.Builder builder)
-
-
Method Detail
-
getWidth
public int getWidth()
Description copied from interface:TextAttributeGets the width of this object- Specified by:
getWidthin interfaceTextAttribute- Returns:
- returns the width, in characters
-
hasChildren
public boolean hasChildren()
Description copied from interface:TextAttributeReturns true if this object has text attribute children.- Specified by:
hasChildrenin interfaceTextAttribute- Returns:
- returns true if this object has a text attribute children, false otherwise
-
getDictionaryIdentifier
public String getDictionaryIdentifier()
Description copied from interface:TextAttributeGets the dictionary identifier that applies to this text attribute.- Specified by:
getDictionaryIdentifierin interfaceTextAttribute- Returns:
- returns the dictionary identifier, or null if it does not have any
-
iterator
public Iterator<TextAttribute> iterator()
- Specified by:
iteratorin interfaceIterable<TextAttribute>
-
-