Package org.apache.maven.doxia.sink.impl
Class SinkEventAttributeSet
java.lang.Object
org.apache.maven.doxia.sink.impl.SinkEventAttributeSet
- All Implemented Interfaces:
Cloneable
,AttributeSet
,MutableAttributeSet
,SinkEventAttributes
Implementation of MutableAttributeSet using a LinkedHashMap.
- Since:
- 1.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Attribute sets for the semantic attribute.Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SinkEventAttributes
An unmodifiable attribute set containing only a bold attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only a boxed attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only a center attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only an italic attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only a justify attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only a left attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only a linethrough attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only a monospaced attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only an overline attribute.private AttributeSet
static final SinkEventAttributes
An unmodifiable attribute set containing only a right attribute.static final SinkEventAttributes
An unmodifiable attribute set containing only an underline attribute.Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Fields inherited from interface org.apache.maven.doxia.sink.SinkEventAttributes
ABBRV, ALIGN, ALT, AXIS, BGCOLOR, BORDER, CELLPADDING, CELLSPACING, CHARSET, CLASS, COLSPAN, COORDS, DATETIME, DECORATION, EMAIL, FRAME, HEADERS, HEIGHT, HREF, HREFLANG, HSPACE, ID, ISMAP, LANG, NAME, NOSHADE, NOWRAP, PROFILE, REL, REV, ROWSPAN, RULES, SCOPE, SECTIONS, SEMANTICS, SHAPE, SIZE, SRC, STYLE, SUMMARY, TARGET, TITLE, TYPE, USEMAP, VALIGN, VALUE, VSPACE, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new, empty SinkEventAttributeSet with default size 5.SinkEventAttributeSet
(int size) Constructs a new, empty SinkEventAttributeSet with the specified initial size.SinkEventAttributeSet
(String... attributes) Constructs a new SinkEventAttributeSet with the attribute name-value mappings as given by the specified String array.SinkEventAttributeSet
(AttributeSet attributes) Constructs a new SinkEventAttributeSet with the same attribute name-value mappings as in the specified AttributeSet. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(Object name, Object value) Adds an attribute with the given name and value.void
addAttributes
(AttributeSet attributes) clone()
boolean
containsAttribute
(Object name, Object value) boolean
containsAttributes
(AttributeSet attributes) boolean
getAttribute
(Object key) int
int
hashCode()
boolean
boolean
isEmpty()
Checks whether the set of attribs is empty.boolean
isEqual
(AttributeSet attr) void
removeAttribute
(Object name) void
removeAttributes
(Enumeration<?> names) void
removeAttributes
(AttributeSet attributes) void
setResolveParent
(AttributeSet parent) toString()
Replace this AttributeSet by an unmodifiable view of itself.
-
Field Details
-
UNDERLINE
An unmodifiable attribute set containing only an underline attribute. -
OVERLINE
An unmodifiable attribute set containing only an overline attribute. -
LINETHROUGH
An unmodifiable attribute set containing only a linethrough attribute. -
BOXED
An unmodifiable attribute set containing only a boxed attribute. -
BOLD
An unmodifiable attribute set containing only a bold attribute. -
ITALIC
An unmodifiable attribute set containing only an italic attribute. -
MONOSPACED
An unmodifiable attribute set containing only a monospaced attribute. -
LEFT
An unmodifiable attribute set containing only a left attribute. -
RIGHT
An unmodifiable attribute set containing only a right attribute. -
CENTER
An unmodifiable attribute set containing only a center attribute. -
JUSTIFY
An unmodifiable attribute set containing only a justify attribute. -
attribs
-
resolveParent
-
-
Constructor Details
-
SinkEventAttributeSet
public SinkEventAttributeSet()Constructs a new, empty SinkEventAttributeSet with default size 5. -
SinkEventAttributeSet
public SinkEventAttributeSet(int size) Constructs a new, empty SinkEventAttributeSet with the specified initial size.- Parameters:
size
- the initial number of attribs.
-
SinkEventAttributeSet
Constructs a new SinkEventAttributeSet with the attribute name-value mappings as given by the specified String array.- Parameters:
attributes
- the specified String array. If the length of this array is not an even number, an IllegalArgumentException is thrown.
-
SinkEventAttributeSet
Constructs a new SinkEventAttributeSet with the same attribute name-value mappings as in the specified AttributeSet.- Parameters:
attributes
- the specified AttributeSet.
-
-
Method Details
-
unmodifiable
Replace this AttributeSet by an unmodifiable view of itself. Any subsequent attempt to add, remove or modify the underlying mapping will result in an UnsupportedOperationException.- Returns:
- an unmodifiable view of this AttributeSet.
- Since:
- 1.1.1
-
isEmpty
public boolean isEmpty()Checks whether the set of attribs is empty.- Returns:
- true if the set is empty.
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCount
in interfaceAttributeSet
- Returns:
- a int.
-
isDefined
- Specified by:
isDefined
in interfaceAttributeSet
-
isEqual
- Specified by:
isEqual
in interfaceAttributeSet
-
copyAttributes
- Specified by:
copyAttributes
in interfaceAttributeSet
- Returns:
- a
AttributeSet
object.
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceAttributeSet
- Returns:
- a
Enumeration
object.
-
getAttribute
- Specified by:
getAttribute
in interfaceAttributeSet
-
containsAttribute
- Specified by:
containsAttribute
in interfaceAttributeSet
-
containsAttributes
- Specified by:
containsAttributes
in interfaceAttributeSet
-
addAttribute
Adds an attribute with the given name and value.- Specified by:
addAttribute
in interfaceMutableAttributeSet
-
addAttributes
- Specified by:
addAttributes
in interfaceMutableAttributeSet
-
removeAttribute
- Specified by:
removeAttribute
in interfaceMutableAttributeSet
-
removeAttributes
- Specified by:
removeAttributes
in interfaceMutableAttributeSet
-
removeAttributes
- Specified by:
removeAttributes
in interfaceMutableAttributeSet
- Parameters:
attributes
- aAttributeSet
object.
-
getResolveParent
- Specified by:
getResolveParent
in interfaceAttributeSet
- Returns:
- a
AttributeSet
object.
-
setResolveParent
- Specified by:
setResolveParent
in interfaceMutableAttributeSet
-
clone
-
hashCode
public int hashCode() -
equals
-
toString
-