Class TagDropper

    • Constructor Summary

      Constructors 
      Constructor Description
      TagDropper()  
      TagDropper​(TagValueListener tvl)
      Create a new TagDropper that will pass on all retained tags and values to tvl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTag​(java.lang.Object tag)
      Add a tag to retain.
      boolean doRetain()
      Find out if known tags are retained or dropped.
      void endTag()
      End the current tag.
      java.util.Set getTags()
      Get the complete set of tags that are currently recognized.
      void removeTag​(java.lang.Object tag)
      Remove a tag so that it will not be retained.
      void setRetain​(boolean retain)
      Set wether known tags are to be retained or dropped.
      void startTag​(java.lang.Object tag)
      Start a new tag.
      void value​(TagValueContext ctxt, java.lang.Object value)
      A value has been seen.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TagDropper

        public TagDropper​(TagValueListener tvl)
        Create a new TagDropper that will pass on all retained tags and values to tvl. Initially, no tags will be retained.
        Parameters:
        tvl - the TagValueListener to inform of all surviving events
    • Method Detail

      • addTag

        public void addTag​(java.lang.Object tag)
        Add a tag to retain.
        Parameters:
        tag - a tag that will be forwarded to the delegate
      • removeTag

        public void removeTag​(java.lang.Object tag)
        Remove a tag so that it will not be retained.
        Parameters:
        tag - a tag that will not be forwarded to the delegate
      • getTags

        public java.util.Set getTags()
        Get the complete set of tags that are currently recognized.
        Returns:
        the Set of known tags
      • setRetain

        public void setRetain​(boolean retain)
        Set wether known tags are to be retained or dropped.

        If retain is true, then all known tags will be passed on and all other tags will be discarded. If retain is true, then all known tags will be dropped and all others passed on.

        Parameters:
        retain - true if the tags are to be retained
      • doRetain

        public boolean doRetain()
        Find out if known tags are retained or dropped.
        Returns:
        true if values are retained