FreeHEP API
Version v1.2.2

hep.graphics.heprep.ref
Class DefaultHepRepInstanceTree

java.lang.Object
  |
  +--hep.graphics.heprep.ref.DefaultHepRepTreeID
        |
        +--hep.graphics.heprep.ref.DefaultHepRepInstanceTree
All Implemented Interfaces:
HepRepInstanceTree, HepRepTreeID, Serializable

public class DefaultHepRepInstanceTree
extends DefaultHepRepTreeID
implements HepRepInstanceTree, Serializable

Version:
$Id: DefaultHepRepInstanceTree.java,v 1.19 2003/12/04 23:25:48 duns Exp $
Author:
M.Donszelmann
See Also:
Serialized Form

Field Summary
static String cvsId
           
 
Constructor Summary
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)
           
 boolean equals(Object o)
           
 List getInstances()
          Returns a collection of instances.
 Set getInstanceTrees()
          Returns a collection of associated instance trees.
 HepRepTreeID getTypeTree()
          Returns the associated typetree.
 int hashCode()
           
 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
getName, getQualifier, getVersion, 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

public 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.
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.

toString

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

display

public void display(String indent)

equals

public boolean equals(Object o)
Overrides:
equals in class DefaultHepRepTreeID

hashCode

public int hashCode()
Overrides:
hashCode in class DefaultHepRepTreeID

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.