public static class FontAttributeSet.Builder extends Object
FontAttributeSet
.Constructor and Description |
---|
Builder()
Starts the building process.
|
Modifier and Type | Method and Description |
---|---|
FontAttributeSet.Builder |
add(Attribute<? extends Serializable>... attributes)
Adds all of the given
Attribute s to the FontAttributeSet under construction. |
FontAttributeSet.Builder |
add(Attribute<? extends Serializable> attribute)
Adds the given
Attribute to the FontAttributeSet under construction. |
FontAttributeSet.Builder |
add(Collection<? extends Attribute<? extends Serializable>> attributes)
Adds the given collection's members to the
FontAttributeSet under construction. |
FontAttributeSet.Builder |
add(FontAttributeSet otherFontAttributeSet)
Adds the given
FontAttributeSet 's members to the FontAttributeSet under
construction. |
FontAttributeSet |
finish()
Finishes building the
FontAttributeSet under construction. |
public FontAttributeSet.Builder add(Attribute<? extends Serializable> attribute)
Attribute
to the FontAttributeSet
under construction. If an
Attribute
of the same type is already present, it will be retained. Previous attributes
of the same type will be retained.public FontAttributeSet.Builder add(Collection<? extends Attribute<? extends Serializable>> attributes)
FontAttributeSet
under construction. If the
collection contains multiple Attribute
instances of the same type, only the first one
will be added. If the collection contains an Attribute
which has a type that is equal to
the type of an Attribute
already present in the FontAttributeSet
under
construction, the one already present will be retained.attributes
- holds the Attribute
s to be added. Must not be null
and
must not contain any null
values.@SafeVarargs public final FontAttributeSet.Builder add(Attribute<? extends Serializable>... attributes)
Attribute
s to the FontAttributeSet
under construction. If
the vararg Array contains multiple Attribute
instances of the same type, only the first
one will be added. If it contains an Attribute
which has a type that is equal to the type
of an Attribute
already present in the FontAttributeSet
under construction, the
one already present will be retained.attributes
- vararg Array holding the Attribute
s to be added. Must not contain any
null
values.public FontAttributeSet.Builder add(FontAttributeSet otherFontAttributeSet)
FontAttributeSet
's members to the FontAttributeSet
under
construction. If the given FontAttributeSet
contains an Attribute
which has a
type that is equal to the type of an Attribute
already present in the
FontAttributeSet
under construction, the one already present will be retained.otherFontAttributeSet
- holds the Attribute
s to be addedpublic FontAttributeSet finish()
FontAttributeSet
under construction. The builder is reset and may
be used to construct another FontAttributeSet
.FontAttributeSet
that has been under construction.Copyright © 2024 levigo holding gmbh. All rights reserved.