|
||||||||||
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(java.lang.String key,
java.lang.String value)
Create a new attribute from unencoded (raw) key and value. |
Method Summary | |
---|---|
Attribute |
clone()
|
static Attribute |
createFromEncoded(java.lang.String unencodedKey,
java.lang.String encodedValue)
Create a new Attribute from an unencoded key and a HTML attribute encoded value. |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getKey()
Get the attribute key. |
java.lang.String |
getValue()
Get the attribute value. |
int |
hashCode()
|
java.lang.String |
html()
Get the HTML representation of this attribute; e.g. |
protected void |
html(java.lang.StringBuilder accum,
Document.OutputSettings out)
|
protected boolean |
isDataAttribute()
|
void |
setKey(java.lang.String key)
Set the attribute key. |
java.lang.String |
setValue(java.lang.String value)
Set the attribute value. |
java.lang.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(java.lang.String key, java.lang.String value)
key
- attribute keyvalue
- attribute valuecreateFromEncoded(java.lang.String, java.lang.String)
Method Detail |
---|
public java.lang.String getKey()
getKey
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
public void setKey(java.lang.String key)
key
- the new key; must not be nullpublic java.lang.String getValue()
getValue
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
public java.lang.String setValue(java.lang.String value)
setValue
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
value
- the new attribute value; must not be nullpublic java.lang.String html()
href="index.html"
.
protected void html(java.lang.StringBuilder accum, Document.OutputSettings out)
public java.lang.String toString()
html()
.
toString
in class java.lang.Object
public static Attribute createFromEncoded(java.lang.String unencodedKey, java.lang.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(java.lang.Object o)
equals
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
hashCode
in class java.lang.Object
public Attribute clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |