gov.fnal.daq.objects
Class CopsObjCollection

java.lang.Object
  extended bygov.fnal.daq.objects.CopsObjAdapter
      extended bygov.fnal.daq.objects.CopsObjCollection
All Implemented Interfaces:
ICopsObj
Direct Known Subclasses:
SLMLine, TransferLine

public class CopsObjCollection
extends CopsObjAdapter

This class is used to form the collection or list of different Cops objects. Intensionally used in task related classes and functions. Also this class is inherited by aggregative classes such as TransferLine, SLM etc.

Author:
Evgeniy N. Sharapov

Nested Class Summary
(package private)  class CopsObjCollection.MetaCopsIterator
          {@inheritDoc} This class is used to traverse objects contained by the CopsObjCollection
 
Nested classes inherited from class gov.fnal.daq.objects.CopsObjAdapter
CopsObjAdapter.EmptyCopsIterator
 
Field Summary
private  java.util.List copsObjList
          This is a list of cops objects.
 
Fields inherited from class gov.fnal.daq.objects.CopsObjAdapter
copsObjId, emptyIterator, number, portNumber, title
 
Constructor Summary
CopsObjCollection()
           
 
Method Summary
 void addCopsObject(ICopsObj object)
          Adds cops object belonging to this one. If object can not be added exception should be thrown.
 void delCopsObject(ICopsObj object)
          Adds cops object belonging to this one. If object can not be removed exception should be thrown.
 ICopsIterator getInnerObjects()
          Returns iterator which traverses through the ICopsObj instances which are inside this object.
 void loadXML(org.w3c.dom.Element xml)
          This function is used to set parameters of the Cops object (already existing) from the XML element representing this cops object.
 org.w3c.dom.Element toXml()
           
 
Methods inherited from class gov.fnal.daq.objects.CopsObjAdapter
equals, getCopsObjId, getErrorMessage, getNumber, getOwner, getPortNumber, getTaskResult, getTitle, getTouchMoment, getType, hasErrorMessage, hashCode, isBackgroundSaved, isGroupSet, isHang, isPortFail, isReadBigData, isReboot, setBackgroundSaved, setCopsObjId, setErrorMessage, setGroupSet, setHang, setNumber, setOwner, setPortFail, setPortNumber, setReadBigData, setReboot, setTaskResult, setTitle, setTouchMoment, setType, toString, toXmlChildren, toXmlProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

copsObjList

private java.util.List copsObjList
This is a list of cops objects.

Constructor Detail

CopsObjCollection

public CopsObjCollection()
Method Detail

addCopsObject

public void addCopsObject(ICopsObj object)
                   throws java.lang.IndexOutOfBoundsException
Adds cops object belonging to this one. If object can not be added exception should be thrown.

Parameters:
object -
Throws:
java.lang.IndexOutOfBoundsException

delCopsObject

public void delCopsObject(ICopsObj object)
                   throws java.lang.IndexOutOfBoundsException
Adds cops object belonging to this one. If object can not be removed exception should be thrown.

Parameters:
object -
Throws:
java.lang.IndexOutOfBoundsException

getInnerObjects

public ICopsIterator getInnerObjects()
Returns iterator which traverses through the ICopsObj instances which are inside this object.

Specified by:
getInnerObjects in interface ICopsObj
Overrides:
getInnerObjects in class CopsObjAdapter
Returns:
instance of CopsObjCollection.MetaCopsIterator.

loadXML

public void loadXML(org.w3c.dom.Element xml)
This function is used to set parameters of the Cops object (already existing) from the XML element representing this cops object.

Parameters:
xml -

toXml

public org.w3c.dom.Element toXml()