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 classAttribute 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 SinkEventAttributesAn unmodifiable attribute set containing only a bold attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only a boxed attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only a center attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only an italic attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only a justify attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only a left attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only a linethrough attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only a monospaced attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only an overline attribute.private AttributeSetstatic final SinkEventAttributesAn unmodifiable attribute set containing only a right attribute.static final SinkEventAttributesAn unmodifiable attribute set containing only an underline attribute.Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttributeFields 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 TypeMethodDescriptionvoidaddAttribute(Object name, Object value) Adds an attribute with the given name and value.voidaddAttributes(AttributeSet attributes) clone()booleancontainsAttribute(Object name, Object value) booleancontainsAttributes(AttributeSet attributes) booleangetAttribute(Object key) intinthashCode()booleanbooleanisEmpty()Checks whether the set of attribs is empty.booleanisEqual(AttributeSet attr) voidremoveAttribute(Object name) voidremoveAttributes(Enumeration<?> names) voidremoveAttributes(AttributeSet attributes) voidsetResolveParent(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:
getAttributeCountin interfaceAttributeSet- Returns:
- a int.
-
isDefined
- Specified by:
isDefinedin interfaceAttributeSet
-
isEqual
- Specified by:
isEqualin interfaceAttributeSet
-
copyAttributes
- Specified by:
copyAttributesin interfaceAttributeSet- Returns:
- a
AttributeSetobject.
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceAttributeSet- Returns:
- a
Enumerationobject.
-
getAttribute
- Specified by:
getAttributein interfaceAttributeSet
-
containsAttribute
- Specified by:
containsAttributein interfaceAttributeSet
-
containsAttributes
- Specified by:
containsAttributesin interfaceAttributeSet
-
addAttribute
Adds an attribute with the given name and value.- Specified by:
addAttributein interfaceMutableAttributeSet
-
addAttributes
- Specified by:
addAttributesin interfaceMutableAttributeSet
-
removeAttribute
- Specified by:
removeAttributein interfaceMutableAttributeSet
-
removeAttributes
- Specified by:
removeAttributesin interfaceMutableAttributeSet
-
removeAttributes
- Specified by:
removeAttributesin interfaceMutableAttributeSet- Parameters:
attributes- aAttributeSetobject.
-
getResolveParent
- Specified by:
getResolveParentin interfaceAttributeSet- Returns:
- a
AttributeSetobject.
-
setResolveParent
- Specified by:
setResolveParentin interfaceMutableAttributeSet
-
clone
-
hashCode
public int hashCode() -
equals
-
toString
-