Class JsoupAttributes
- java.lang.Object
-
- com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupAttributes
-
- All Implemented Interfaces:
IAttributes
,java.lang.Iterable<IAttribute>
public class JsoupAttributes extends java.lang.Object implements IAttributes
Implementation of theIAttributes
interface; wrapper for the JSoupAttributes
class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JsoupAttributes.AttributeIterator
Iterator to loop overIAttribute
elements.
-
Field Summary
Fields Modifier and Type Field Description private Attributes
attributes
The JSoupAttributes
instance.
-
Constructor Summary
Constructors Constructor Description JsoupAttributes(Attributes attributes)
Creates a newJsoupAttributes
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAttribute(java.lang.String key)
Gets the value of an attribute, given a key.java.util.Iterator<IAttribute>
iterator()
void
setAttribute(java.lang.String key, java.lang.String value)
Adds a key and a value of an attributes.int
size()
Returns the number of attributes.
-
-
-
Field Detail
-
attributes
private Attributes attributes
The JSoupAttributes
instance.
-
-
Constructor Detail
-
JsoupAttributes
public JsoupAttributes(Attributes attributes)
Creates a newJsoupAttributes
instance.- Parameters:
attributes
- the attributes
-
-
Method Detail
-
getAttribute
public java.lang.String getAttribute(java.lang.String key)
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
public void setAttribute(java.lang.String key, java.lang.String value)
Description copied from interface:IAttributes
Adds a key and a value of an attributes.- Specified by:
setAttribute
in interfaceIAttributes
- Parameters:
key
- the keyvalue
- 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
public java.util.Iterator<IAttribute> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<IAttribute>
-
-