Package org.daisy.dotify.api.translator
Class DefaultAttributeWithContext.Builder
- java.lang.Object
-
- org.daisy.dotify.api.translator.DefaultAttributeWithContext.Builder
-
- Enclosing class:
- DefaultAttributeWithContext
public static class DefaultAttributeWithContext.Builder extends Object
Provides a builder for a default text attribute
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultAttributeWithContext.Builder
add(int val)
Adds a new attribute with the specified widthDefaultAttributeWithContext.Builder
add(AttributeWithContext data)
Adds a text attribute to the list of attributesDefaultAttributeWithContext
build(int length)
Creates a new default text attribute based on the current state of the builder
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new builder
-
Builder
public Builder(String attribute)
Creates a new builder with the specified attribute name- Parameters:
attribute
- the attribute name
-
-
Method Detail
-
add
public DefaultAttributeWithContext.Builder add(AttributeWithContext data)
Adds a text attribute to the list of attributes- Parameters:
data
- the attribute- Returns:
- this builder
-
add
public DefaultAttributeWithContext.Builder add(int val)
Adds a new attribute with the specified width- Parameters:
val
- the width of the attribute- Returns:
- this builder
-
build
public DefaultAttributeWithContext build(int length)
Creates a new default text attribute based on the current state of the builder- Parameters:
length
- the total length of the contained attributes- Returns:
- a new default text attribute
-
-