Package org.apache.maven.doxia.sink.impl
Class SinkEventAttributeSet
- java.lang.Object
-
- org.apache.maven.doxia.sink.impl.SinkEventAttributeSet
-
- All Implemented Interfaces:
java.lang.Cloneable
,javax.swing.text.AttributeSet
,javax.swing.text.MutableAttributeSet
,org.apache.maven.doxia.sink.SinkEventAttributes
public class SinkEventAttributeSet extends java.lang.Object implements org.apache.maven.doxia.sink.SinkEventAttributes, java.lang.Cloneable
Implementation of MutableAttributeSet using a LinkedHashMap.- Since:
- 1.1
- Author:
- ltheussl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SinkEventAttributeSet.Semantics
Attribute sets for the semantic attribute.
-
Field Summary
Fields Modifier and Type Field Description static org.apache.maven.doxia.sink.SinkEventAttributes
BOLD
An unmodifiable attribute set containing only a bold attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
BOXED
An unmodifiable attribute set containing only a boxed attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
CENTER
An unmodifiable attribute set containing only a center attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
ITALIC
An unmodifiable attribute set containing only an italic attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
JUSTIFY
An unmodifiable attribute set containing only a justify attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
LEFT
An unmodifiable attribute set containing only a left attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
LINETHROUGH
An unmodifiable attribute set containing only a linethrough attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
MONOSPACED
An unmodifiable attribute set containing only a monospaced attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
OVERLINE
An unmodifiable attribute set containing only an overline attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
RIGHT
An unmodifiable attribute set containing only a right attribute.static org.apache.maven.doxia.sink.SinkEventAttributes
UNDERLINE
An unmodifiable attribute set containing only an underline attribute.-
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
Constructors Constructor Description SinkEventAttributeSet()
Constructs a new, empty SinkEventAttributeSet with default size 5.SinkEventAttributeSet(int size)
Constructs a new, empty SinkEventAttributeSet with the specified initial size.SinkEventAttributeSet(java.lang.String... attributes)
Constructs a new SinkEventAttributeSet with the attribute name-value mappings as given by the specified String array.SinkEventAttributeSet(javax.swing.text.AttributeSet attributes)
Constructs a new SinkEventAttributeSet with the same attribute name-value mappings as in the specified AttributeSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(java.lang.Object name, java.lang.Object value)
Adds an attribute with the given name and value.void
addAttributes(javax.swing.text.AttributeSet attributes)
java.lang.Object
clone()
boolean
containsAttribute(java.lang.Object name, java.lang.Object value)
boolean
containsAttributes(javax.swing.text.AttributeSet attributes)
javax.swing.text.AttributeSet
copyAttributes()
boolean
equals(java.lang.Object obj)
java.lang.Object
getAttribute(java.lang.Object key)
int
getAttributeCount()
java.util.Enumeration<java.lang.String>
getAttributeNames()
javax.swing.text.AttributeSet
getResolveParent()
int
hashCode()
boolean
isDefined(java.lang.Object attrName)
boolean
isEmpty()
Checks whether the set of attribs is empty.boolean
isEqual(javax.swing.text.AttributeSet attr)
void
removeAttribute(java.lang.Object name)
void
removeAttributes(java.util.Enumeration<?> names)
void
removeAttributes(javax.swing.text.AttributeSet attributes)
void
setResolveParent(javax.swing.text.AttributeSet parent)
java.lang.String
toString()
SinkEventAttributeSet
unmodifiable()
Replace this AttributeSet by an unmodifiable view of itself.
-
-
-
Field Detail
-
UNDERLINE
public static final org.apache.maven.doxia.sink.SinkEventAttributes UNDERLINE
An unmodifiable attribute set containing only an underline attribute.
-
OVERLINE
public static final org.apache.maven.doxia.sink.SinkEventAttributes OVERLINE
An unmodifiable attribute set containing only an overline attribute.
-
LINETHROUGH
public static final org.apache.maven.doxia.sink.SinkEventAttributes LINETHROUGH
An unmodifiable attribute set containing only a linethrough attribute.
-
BOXED
public static final org.apache.maven.doxia.sink.SinkEventAttributes BOXED
An unmodifiable attribute set containing only a boxed attribute.
-
BOLD
public static final org.apache.maven.doxia.sink.SinkEventAttributes BOLD
An unmodifiable attribute set containing only a bold attribute.
-
ITALIC
public static final org.apache.maven.doxia.sink.SinkEventAttributes ITALIC
An unmodifiable attribute set containing only an italic attribute.
-
MONOSPACED
public static final org.apache.maven.doxia.sink.SinkEventAttributes MONOSPACED
An unmodifiable attribute set containing only a monospaced attribute.
-
LEFT
public static final org.apache.maven.doxia.sink.SinkEventAttributes LEFT
An unmodifiable attribute set containing only a left attribute.
-
RIGHT
public static final org.apache.maven.doxia.sink.SinkEventAttributes RIGHT
An unmodifiable attribute set containing only a right attribute.
-
CENTER
public static final org.apache.maven.doxia.sink.SinkEventAttributes CENTER
An unmodifiable attribute set containing only a center attribute.
-
JUSTIFY
public static final org.apache.maven.doxia.sink.SinkEventAttributes JUSTIFY
An unmodifiable attribute set containing only a justify attribute.
-
-
Constructor Detail
-
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
public SinkEventAttributeSet(java.lang.String... attributes)
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
public SinkEventAttributeSet(javax.swing.text.AttributeSet attributes)
Constructs a new SinkEventAttributeSet with the same attribute name-value mappings as in the specified AttributeSet.- Parameters:
attributes
- the specified AttributeSet.
-
-
Method Detail
-
unmodifiable
public SinkEventAttributeSet 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 interfacejavax.swing.text.AttributeSet
- Returns:
- a int.
-
isDefined
public boolean isDefined(java.lang.Object attrName)
- Specified by:
isDefined
in interfacejavax.swing.text.AttributeSet
-
isEqual
public boolean isEqual(javax.swing.text.AttributeSet attr)
- Specified by:
isEqual
in interfacejavax.swing.text.AttributeSet
-
copyAttributes
public javax.swing.text.AttributeSet copyAttributes()
- Specified by:
copyAttributes
in interfacejavax.swing.text.AttributeSet
- Returns:
- a
AttributeSet
object.
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames
in interfacejavax.swing.text.AttributeSet
- Returns:
- a
Enumeration
object.
-
getAttribute
public java.lang.Object getAttribute(java.lang.Object key)
- Specified by:
getAttribute
in interfacejavax.swing.text.AttributeSet
-
containsAttribute
public boolean containsAttribute(java.lang.Object name, java.lang.Object value)
- Specified by:
containsAttribute
in interfacejavax.swing.text.AttributeSet
-
containsAttributes
public boolean containsAttributes(javax.swing.text.AttributeSet attributes)
- Specified by:
containsAttributes
in interfacejavax.swing.text.AttributeSet
-
addAttribute
public void addAttribute(java.lang.Object name, java.lang.Object value)
Adds an attribute with the given name and value.- Specified by:
addAttribute
in interfacejavax.swing.text.MutableAttributeSet
-
addAttributes
public void addAttributes(javax.swing.text.AttributeSet attributes)
- Specified by:
addAttributes
in interfacejavax.swing.text.MutableAttributeSet
-
removeAttribute
public void removeAttribute(java.lang.Object name)
- Specified by:
removeAttribute
in interfacejavax.swing.text.MutableAttributeSet
-
removeAttributes
public void removeAttributes(java.util.Enumeration<?> names)
- Specified by:
removeAttributes
in interfacejavax.swing.text.MutableAttributeSet
-
removeAttributes
public void removeAttributes(javax.swing.text.AttributeSet attributes)
- Specified by:
removeAttributes
in interfacejavax.swing.text.MutableAttributeSet
- Parameters:
attributes
- aAttributeSet
object.
-
getResolveParent
public javax.swing.text.AttributeSet getResolveParent()
- Specified by:
getResolveParent
in interfacejavax.swing.text.AttributeSet
- Returns:
- a
AttributeSet
object.
-
setResolveParent
public void setResolveParent(javax.swing.text.AttributeSet parent)
- Specified by:
setResolveParent
in interfacejavax.swing.text.MutableAttributeSet
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-