org.erowid.sperowider.htmlshredding
Class HTMLTagAttribute

java.lang.Object
  extended byorg.erowid.sperowider.htmlshredding.HTMLTagAttribute

public class HTMLTagAttribute
extends Object

Represents a given attribute inside of an HTML tag. It's either just a name or a name and a value.

Version:
$Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperowider/htmlshredding/HTMLTagAttribute.java,v 1.4 2005/06/08 09:12:28 gurustu Exp $
Author:
Stu Statman


Constructor Summary
HTMLTagAttribute(String name)
          Creates a new attribute with no value
HTMLTagAttribute(String name, String value)
          Creates a new attribute with a value.
 
Method Summary
 String getName()
          Gets the attribute name.
 String getValue()
          Gets the attribute value.
 boolean isSingletonAttribute()
          Returns true if this tag has no value.
 void setName(String name)
          Sets the attribute name.
 void setValue(String value)
          Sets the attribute value.
 void write(Writer w, boolean withLeadingSpace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLTagAttribute

public HTMLTagAttribute(String name)
Creates a new attribute with no value


HTMLTagAttribute

public HTMLTagAttribute(String name,
                        String value)
Creates a new attribute with a value.

Method Detail

setName

public void setName(String name)
Sets the attribute name.


setValue

public void setValue(String value)
Sets the attribute value.


getName

public String getName()
Gets the attribute name.


getValue

public String getValue()
Gets the attribute value.


isSingletonAttribute

public boolean isSingletonAttribute()
Returns true if this tag has no value.


write

public void write(Writer w,
                  boolean withLeadingSpace)
           throws IOException
Throws:
IOException

spero logo small Sperowider is
© 2005 Erowid.org