Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.util
Class SpecialHashtable

    java.lang.Object
      java.util.Dictionary
          java.util.Hashtable
              org.htmlparser.util.SpecialHashtable

All Implemented Interfaces:
  Cloneable, Map, Serializable

public class SpecialHashtable
extends Hashtable

Acts like a regular HashTable, except some values are translated in get(String). Specifically, `Tag.NULLVALUE` is translated to `null` and `Tag.NOTHING` is translated to `""`. This is done for backwards compatibility, users are expecting a HashTable, but Tag.toHTML needs to know when there is no attribute value (<

See Also:
  Serialized Form

Field Summary
`static String` | `NOTHING` Special value for an empty attribute value.
`static String` | `NULLVALUE` Special value for a null attribute value.
`static String` | `TAGNAME` Special key for the tag name.

Constructor Summary
`SpecialHashtable()` Constructs a new, empty hashtable with a default initial capacity (11) and load factor, which is 0.75.
`SpecialHashtable(int initialCapacity)` Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.
`SpecialHashtable(int initialCapacity, float loadFactor)` Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.

Method Summary
`Object` | `get(Object key)` Returns the value to which the specified key is mapped in this hashtable.
`Object` | `getRaw(Object key)` Returns the raw (untranslated) value to which the specified key is mapped in this hashtable.

Methods inherited from class java.util.Hashtable
`clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### TAGNAME

    public static final String TAGNAME

  Special key for the tag name.

  See Also:
    Constant Field Values

### NULLVALUE

    public static final String NULLVALUE

  Special value for a null attribute value.

  See Also:
    Constant Field Values

### NOTHING

    public static final String NOTHING

  Special value for an empty attribute value.

  See Also:
    Constant Field Values

Constructor Detail

### SpecialHashtable

    public SpecialHashtable()

  Constructs a new, empty hashtable with a default initial capacity (11) and load factor, which is 0.75.

### SpecialHashtable

    public SpecialHashtable(int initialCapacity)

  Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.

### SpecialHashtable

    public SpecialHashtable(int initialCapacity,
                            float loadFactor)

  Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.

Method Detail

### get

    public Object get(Object key)

  Returns the value to which the specified key is mapped in this hashtable. This is translated to provide backwards compatibility.

  Returns:
    The translated value of the attribute. This will be `null` if the attribute is a stand-alone attribute.

### getRaw

    public Object getRaw(Object key)

  Returns the raw (untranslated) value to which the specified key is mapped in this hashtable.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.