|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsoup.nodes.Attribute
public class Attribute
A single key + value attribute. Keys are trimmed and normalised to lower-case.
| Constructor Summary | |
|---|---|
Attribute(String key, String value) Create a new attribute from unencoded (raw) key and value. |
|
| Method Summary | |
|---|---|
Attribute |
clone() |
static Attribute |
createFromEncoded(String unencodedKey, String encodedValue) Create a new Attribute from an unencoded key and a HMTL attribute encoded value. |
boolean |
equals(Object o) |
String |
getKey() Get the attribute key. |
String |
getValue() Get the attribute value. |
int |
hashCode() |
String |
html() Get the HTML representation of this attribute; e.g. |
protected void |
html(StringBuilder accum, Document.OutputSettings out) |
protected boolean |
isDataAttribute() |
void |
setKey(String key) Set the attribute key. |
String |
setValue(String value) Set the attribute value. |
String |
toString() Get the string representation of this attribute, implemented as html(). |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Attribute(String key,
String value)
key - attribute key
value - attribute value
createFromEncoded(java.lang.String, java.lang.String)
| Method Detail |
|---|
public String getKey()
getKey in interface
Map.Entry<String,String>
public void setKey(String key)
key - the new key; must not be null
public String getValue()
getValue in interface
Map.Entry<String,String>
public String setValue(String value)
setValue in interface
Map.Entry<String,String>
value - the new attribute value; must not be null
public String html()
href="index.html".
protected void html(StringBuilder accum,
Document.OutputSettings out)
public String toString()
html().
toString in class
Object
public static Attribute createFromEncoded(String unencodedKey,
String encodedValue)
unencodedKey - assumes the key is not encoded, as can be only run of simple \w chars.
encodedValue - HTML attribute encoded value
protected boolean isDataAttribute()
public boolean equals(Object o)
equals in interface
Map.Entry<String,String>
equals in class
Object
public int hashCode()
hashCode in interface
Map.Entry<String,String>
hashCode in class
Object
public Attribute clone()
clone in class
Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||