Package org.cyberneko.html
Class HTMLAugmentations
java.lang.Object
org.cyberneko.html.HTMLAugmentations
- All Implemented Interfaces:
org.apache.xerces.xni.Augmentations
This class is here to overcome the XNI changes to the
Augmentations
interface. In early versions of XNI, the
augmentations interface contained a clear()
method to
remove all of the items from the augmentations instance. A later
version of XNI changed this method to removeAllItems()
.
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all of the elements in this augmentations object.Get information identified by a key from the Augmentations structure.keys()
Returns an enumeration of the keys in the Augmentations structure.Add additional information identified by a key to the Augmentations structure.void
Removes all of the elements in this augmentations object.removeItem
(String key) Remove additional info from the Augmentations structure
-
Field Details
-
fItems
Augmentation items.
-
-
Constructor Details
-
HTMLAugmentations
public HTMLAugmentations()
-
-
Method Details
-
removeAllItems
public void removeAllItems()Removes all of the elements in this augmentations object.- Specified by:
removeAllItems
in interfaceorg.apache.xerces.xni.Augmentations
-
clear
public void clear()Removes all of the elements in this augmentations object. -
putItem
Add additional information identified by a key to the Augmentations structure.- Specified by:
putItem
in interfaceorg.apache.xerces.xni.Augmentations
- Parameters:
key
- Identifier, can't benull
item
- Additional information- Returns:
- The previous value of the specified key in the Augmentations
structure, or
null
if it did not have one.
-
getItem
Get information identified by a key from the Augmentations structure.- Specified by:
getItem
in interfaceorg.apache.xerces.xni.Augmentations
- Parameters:
key
- Identifier, can't benull
- Returns:
- The value to which the key is mapped in the Augmentations
structure;
null
if the key is not mapped to any value.
-
removeItem
Remove additional info from the Augmentations structure- Specified by:
removeItem
in interfaceorg.apache.xerces.xni.Augmentations
- Parameters:
key
- Identifier, can't benull
- Returns:
- The previous value of the specified key in the Augmentations
structure, or
null
if it did not have one.
-
keys
Returns an enumeration of the keys in the Augmentations structure.- Specified by:
keys
in interfaceorg.apache.xerces.xni.Augmentations
-