FreeHEP API
Version current

hep.graphics.heprep.ref
Class DefaultHepRepInstanceTree

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepTreeID
      extended byhep.graphics.heprep.ref.DefaultHepRepInstanceTree
All Implemented Interfaces:
HepRepInstanceTree, HepRepTreeID, Serializable

public class DefaultHepRepInstanceTree
extends DefaultHepRepTreeID
implements HepRepInstanceTree, Serializable

Version:
$Id: DefaultHepRepInstanceTree.java,v 1.24 2004/09/03 18:18:39 duns Exp $
Author:
M.Donszelmann
See Also:
Serialized Form
Source Code:
DefaultHepRepInstanceTree.java

Field Summary
static String cvsId
           
 
Constructor Summary
protected DefaultHepRepInstanceTree(String name, String version, HepRepTreeID typeTree)
           
 
Method Summary
 void addInstance(HepRepInstance instance)
          Adds an instance to this instancetree.
 void addInstanceTree(HepRepTreeID instanceTree)
          Adds a related instance tree to this instancetree.
 HepRepInstanceTree copy(HepRepTypeTree typeTree)
          Returns a deep copy of this instancetree.
 HepRepInstanceTree copy(HepRepTypeTree typeTree, HepRepSelectFilter filter)
          Returns a deep copy of this instancetree.
 void display(String indent)
           
 List getInstances()
          Returns a collection of instances.
 List getInstanceTreeList()
          Returns a collection of associated instance trees.
 Set getInstanceTrees()
          Returns a collection of associated instance trees.
 HepRepTreeID getTypeTree()
          Returns the associated typetree.
 void overlay(HepRepInstanceTree instanceTree)
          Overlays the instance tree on the current tree.
 void removeInstance(HepRepInstance instance)
          Removes an instance from this instancetree.
 String toString()
           
 
Methods inherited from class hep.graphics.heprep.ref.DefaultHepRepTreeID
equals, getName, getQualifier, getVersion, hashCode, setQualifier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hep.graphics.heprep.HepRepTreeID
getName, getQualifier, getVersion, setQualifier
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values
Constructor Detail

DefaultHepRepInstanceTree

protected DefaultHepRepInstanceTree(String name,
                                    String version,
                                    HepRepTreeID typeTree)
Method Detail

overlay

public void overlay(HepRepInstanceTree instanceTree)
Description copied from interface: HepRepInstanceTree
Overlays the instance tree on the current tree. The list of instances of the instanceTree has to be the same as the current tree.

Specified by:
overlay in interface HepRepInstanceTree

copy

public HepRepInstanceTree copy(HepRepTypeTree typeTree)
                        throws CloneNotSupportedException
Description copied from interface: HepRepInstanceTree
Returns a deep copy of this instancetree.

Specified by:
copy in interface HepRepInstanceTree
Returns:
copy of this instancetree.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstanceTree copy(HepRepTypeTree typeTree,
                               HepRepSelectFilter filter)
                        throws CloneNotSupportedException
Description copied from interface: HepRepInstanceTree
Returns a deep copy of this instancetree.

Specified by:
copy in interface HepRepInstanceTree
Parameters:
filter - to filter the instances.
Returns:
copy of this instancetree.
Throws:
CloneNotSupportedException - if copying is not possible.

addInstance

public void addInstance(HepRepInstance instance)
Description copied from interface: HepRepInstanceTree
Adds an instance to this instancetree.

Specified by:
addInstance in interface HepRepInstanceTree
Parameters:
instance - to be added.

removeInstance

public void removeInstance(HepRepInstance instance)
                    throws UnsupportedOperationException
Description copied from interface: HepRepInstanceTree
Removes an instance from this instancetree.

Specified by:
removeInstance in interface HepRepInstanceTree
Parameters:
instance - to be removed.
Throws:
UnsupportedOperationException

getInstances

public List getInstances()
Description copied from interface: HepRepInstanceTree
Returns a collection of instances.

Specified by:
getInstances in interface HepRepInstanceTree
Returns:
collection of HepRepInstances.

addInstanceTree

public void addInstanceTree(HepRepTreeID instanceTree)
Description copied from interface: HepRepInstanceTree
Adds a related instance tree to this instancetree.

Specified by:
addInstanceTree in interface HepRepInstanceTree
Parameters:
instanceTree - related instancetree.

getTypeTree

public HepRepTreeID getTypeTree()
Description copied from interface: HepRepInstanceTree
Returns the associated typetree.

Specified by:
getTypeTree in interface HepRepInstanceTree
Returns:
TreeID of the associated typetree.

getInstanceTrees

public Set getInstanceTrees()
Description copied from interface: HepRepInstanceTree
Returns a collection of associated instance trees.

Specified by:
getInstanceTrees in interface HepRepInstanceTree
Returns:
collection of HepRepTreeIDs.

getInstanceTreeList

public List getInstanceTreeList()
Description copied from interface: HepRepInstanceTree
Returns a collection of associated instance trees.

Specified by:
getInstanceTreeList in interface HepRepInstanceTree
Returns:
collection of HepRepTreeIDs.

toString

public String toString()
Overrides:
toString in class DefaultHepRepTreeID
Returns:
a string representation of this HepRepInstanceTree

display

public void display(String indent)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.