Class JsoupAttributes
java.lang.Object
com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupAttributes
- All Implemented Interfaces:
-
IAttributes
,Iterable<IAttribute>
Implementation of the
IAttributes
interface; wrapper for the JSoup Attributes
class.
-
Constructor Summary
ConstructorDescriptionJsoupAttributes
(com.itextpdf.styledxmlparser.jsoup.nodes.Attributes attributes) Creates a newJsoupAttributes
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String key) Gets the value of an attribute, given a key.iterator()
void
setAttribute
(String key, String value) Adds a key and a value of an attributes.int
size()
Returns the number of attributes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JsoupAttributes
public JsoupAttributes(com.itextpdf.styledxmlparser.jsoup.nodes.Attributes attributes) Creates a newJsoupAttributes
instance.- Parameters:
-
attributes
- the attributes
-
-
Method Details
-
getAttribute
Description copied from interface:IAttributes
Gets the value of an attribute, given a key.- Specified by:
-
getAttribute
in interfaceIAttributes
- Parameters:
-
key
- the key - Returns:
- the attribute
-
setAttribute
Description copied from interface:IAttributes
Adds a key and a value of an attributes.- Specified by:
-
setAttribute
in interfaceIAttributes
- Parameters:
-
key
- the key -
value
- the value
-
size
public int size()Description copied from interface:IAttributes
Returns the number of attributes.- Specified by:
-
size
in interfaceIAttributes
- Returns:
- the number of attributes
-
iterator
- Specified by:
-
iterator
in interfaceIterable<IAttribute>
-