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
,org.apache.maven.doxia.sink.SinkEventAttributes
public class SinkEventAttributeSet
extends Object
implements org.apache.maven.doxia.sink.SinkEventAttributes, Cloneable
Implementation of MutableAttributeSet using a LinkedHashMap.
- Since:
- 1.1
- Author:
- ltheussl
-
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 org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a bold attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a boxed attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a center attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only an italic attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a justify attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a left attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a linethrough attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a monospaced attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only an overline attribute.static final org.apache.maven.doxia.sink.SinkEventAttributes
An unmodifiable attribute set containing only a right attribute.static final org.apache.maven.doxia.sink.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
public static final org.apache.maven.doxia.sink.SinkEventAttributes UNDERLINEAn unmodifiable attribute set containing only an underline attribute. -
OVERLINE
public static final org.apache.maven.doxia.sink.SinkEventAttributes OVERLINEAn unmodifiable attribute set containing only an overline attribute. -
LINETHROUGH
public static final org.apache.maven.doxia.sink.SinkEventAttributes LINETHROUGHAn unmodifiable attribute set containing only a linethrough attribute. -
BOXED
public static final org.apache.maven.doxia.sink.SinkEventAttributes BOXEDAn unmodifiable attribute set containing only a boxed attribute. -
BOLD
public static final org.apache.maven.doxia.sink.SinkEventAttributes BOLDAn unmodifiable attribute set containing only a bold attribute. -
ITALIC
public static final org.apache.maven.doxia.sink.SinkEventAttributes ITALICAn unmodifiable attribute set containing only an italic attribute. -
MONOSPACED
public static final org.apache.maven.doxia.sink.SinkEventAttributes MONOSPACEDAn unmodifiable attribute set containing only a monospaced attribute. -
LEFT
public static final org.apache.maven.doxia.sink.SinkEventAttributes LEFTAn unmodifiable attribute set containing only a left attribute. -
RIGHT
public static final org.apache.maven.doxia.sink.SinkEventAttributes RIGHTAn unmodifiable attribute set containing only a right attribute. -
CENTER
public static final org.apache.maven.doxia.sink.SinkEventAttributes CENTERAn unmodifiable attribute set containing only a center attribute. -
JUSTIFY
public static final org.apache.maven.doxia.sink.SinkEventAttributes JUSTIFYAn unmodifiable attribute set containing only a justify attribute.
-
-
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
-