org.freehep.util.io
Class TagSet

java.lang.Object
  extended by org.freehep.util.io.TagSet

public class TagSet
extends Object

Class to keep registered Tags, which should be used by the TaggedIn/OutputStream. A set of recognized Tags can be added to this class. A concrete implementation of this stream should install all allowed tags.

Version:
$Id: TagSet.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann, Charles Loomis

Field Summary
protected  Tag defaultTag
          The default tag handler.
protected  Map tags
          This holds the individual tags.
 
Constructor Summary
TagSet()
          Creates a Tag Set.
 
Method Summary
 void addTag(Tag tag)
          Add a new tag to this set.
 boolean exists(int tagID)
          Finds out if Tag for TagID exists.
 Tag get(int tagID)
          Find tag for tagID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tags

protected Map tags
This holds the individual tags.


defaultTag

protected Tag defaultTag
The default tag handler.

Constructor Detail

TagSet

public TagSet()
Creates a Tag Set.

Method Detail

addTag

public void addTag(Tag tag)
Add a new tag to this set. If the tagID returned is the DEFAULT_TAG, then the default handler is set to the given handler.

Parameters:
tag - tag to be added to set

get

public Tag get(int tagID)
Find tag for tagID.

Parameters:
tagID - tagID to find
Returns:
correspoding tag or UndefinedTag if tagID is not found.

exists

public boolean exists(int tagID)
Finds out if Tag for TagID exists.

Parameters:
tagID - tagID to find
Returns:
true if corresponding Tag for TagID exists


Copyright © 2000-2007 FreeHEP. All Rights Reserved.