Package org.codelibs.nekohtml
Class HTMLAugmentations
- java.lang.Object
-
- org.codelibs.nekohtml.HTMLAugmentations
-
- All Implemented Interfaces:
org.apache.xerces.xni.Augmentations
public class HTMLAugmentations extends java.lang.Object implements org.apache.xerces.xni.AugmentationsThis class is here to overcome the XNI changes to theAugmentationsinterface. In early versions of XNI, the augmentations interface contained aclear()method to remove all of the items from the augmentations instance. A later version of XNI changed this method toremoveAllItems(). Therefore, this class extends the augmentations interface and explicitly implements both of these methods.Note: This code is inspired by performance enhancements submitted by Marc-Andr� Morissette.
- Author:
- Andy Clark
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Hashtable<java.lang.String,java.lang.Object>fItemsAugmentation items.
-
Constructor Summary
Constructors Constructor Description HTMLAugmentations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all of the elements in this augmentations object.java.lang.ObjectgetItem(java.lang.String key)Get information identified by a key from the Augmentations structure.java.util.Enumeration<java.lang.String>keys()Returns an enumeration of the keys in the Augmentations structure.java.lang.ObjectputItem(java.lang.String key, java.lang.Object item)Add additional information identified by a key to the Augmentations structure.voidremoveAllItems()Removes all of the elements in this augmentations object.java.lang.ObjectremoveItem(java.lang.String key)Remove additional info from the Augmentations structure
-
-
-
Method Detail
-
removeAllItems
public void removeAllItems()
Removes all of the elements in this augmentations object.- Specified by:
removeAllItemsin interfaceorg.apache.xerces.xni.Augmentations
-
clear
public void clear()
Removes all of the elements in this augmentations object.
-
putItem
public java.lang.Object putItem(java.lang.String key, java.lang.Object item)Add additional information identified by a key to the Augmentations structure.- Specified by:
putItemin interfaceorg.apache.xerces.xni.Augmentations- Parameters:
key- Identifier, can't benullitem- Additional information- Returns:
- The previous value of the specified key in the Augmentations
structure, or
nullif it did not have one.
-
getItem
public java.lang.Object getItem(java.lang.String key)
Get information identified by a key from the Augmentations structure.- Specified by:
getItemin interfaceorg.apache.xerces.xni.Augmentations- Parameters:
key- Identifier, can't benull- Returns:
- The value to which the key is mapped in the Augmentations
structure;
nullif the key is not mapped to any value.
-
removeItem
public java.lang.Object removeItem(java.lang.String key)
Remove additional info from the Augmentations structure- Specified by:
removeItemin interfaceorg.apache.xerces.xni.Augmentations- Parameters:
key- Identifier, can't benull- Returns:
- The previous value of the specified key in the Augmentations
structure, or
nullif it did not have one.
-
keys
public java.util.Enumeration<java.lang.String> keys()
Returns an enumeration of the keys in the Augmentations structure.- Specified by:
keysin interfaceorg.apache.xerces.xni.Augmentations
-
-