Java Reference
In-Depth Information
this.attributes.put(name.toLowerCase(), value);
}
/**
* @param ending
* The ending to set.
*/
public void setEnding(boolean ending)
{
this.ending = ending;
}
/**
* Set the tag name.
*/
public void setName(String s)
{
this.name = s;
}
/**
* Convert this tag back into string form, with the
* beginning < and ending >.
*
* @param id
* A zero based index that specifies the
* attribute to retrieve.
* @return The Attribute object that was found.
*/
@Override
public String toString()
{
StringBuilder buffer = new StringBuilder("<");
buffer.append(this.name);
Set<String> set = this.attributes.keySet();
for (String key : set)
{
String value = this.attributes.get(key);
buffer.append(' ');
if (value == null)
{
buffer.append("\"");
buffer.append(key);
buffer.append("\"");
Search WWH ::




Custom Search