public class Attribute
extends java.lang.Object
implements java.util.Map.Entry<java.lang.String,java.lang.String>, java.lang.Cloneable
| Constructor and Description |
|---|
Attribute(java.lang.String key,
java.lang.String value)
Create a new attribute from unencoded (raw) key and value.
|
Attribute(java.lang.String key,
java.lang.String val,
Attributes parent)
Create a new attribute from unencoded (raw) key and value.
|
| Modifier and Type | Method and Description |
|---|---|
Attribute |
clone() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getKey()
Get the attribute key.
|
java.lang.String |
getValue()
Get the attribute value.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
Set the attribute key; case is preserved.
|
java.lang.String |
setValue(java.lang.String val)
Set the attribute value.
|
public Attribute(java.lang.String key,
java.lang.String value)
key - attribute key; case is preserved.value - attribute valuepublic Attribute(java.lang.String key,
java.lang.String val,
Attributes parent)
key - attribute key; case is preserved.val - attribute valueparent - the containing Attributes (this Attribute is not automatically added to said Attributes)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 val)
setValue in interface java.util.Map.Entry<java.lang.String,java.lang.String>val - the new attribute value; must not be nullpublic boolean equals(java.lang.Object o)
equals in interface java.util.Map.Entry<java.lang.String,java.lang.String>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Map.Entry<java.lang.String,java.lang.String>hashCode in class java.lang.Objectpublic Attribute clone()
clone in class java.lang.Object