Class SvgAttribute
java.lang.Object
pro.verron.asciidoc.converters.svg.SvgAttribute
- All Implemented Interfaces:
Comparable<SvgAttribute>
An SVG attribute name/value pair, used when constructing SVG elements.
Instances are created via the factory method attr(String, String).
The sentinel value NONE represents an absent attribute and is
filtered out during serialization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SvgAttributeSentinel value representing an absent attribute; filtered out during serialization. -
Method Summary
Modifier and TypeMethodDescriptionstatic SvgAttributeCreates an attribute with an integer value.static SvgAttributeCreates an attribute with a string value.intcompareTo(SvgAttribute that) booleaninthashCode()Serializes this attribute asname="value".toString()
-
Field Details
-
NONE
Sentinel value representing an absent attribute; filtered out during serialization.
-
-
Method Details
-
attr
Creates an attribute with a string value.- Parameters:
name- attribute namevalue- attribute value- Returns:
- the new
SvgAttribute
-
attr
Creates an attribute with an integer value.- Parameters:
name- attribute namei- attribute value- Returns:
- the new
SvgAttribute
-
compareTo
- Specified by:
compareToin interfaceComparable<SvgAttribute>
-
hashCode
-
equals
-
toString
-
serialize
Serializes this attribute asname="value".- Returns:
- the serialized attribute string
-