|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hep.graphics.heprep.ref.DefaultHepRepIterator
Fast iterator, which allows for iteration of all HepRepInstances in a HepRepInstanceTree or for iteration of a specific layer. It also features a callback to a HepRepListener to signal changes in attributes.
Constructor Summary | |
DefaultHepRepIterator(HepRepInstanceTree instanceTree)
Creates a HepRepIterator for the given InstanceTree. |
|
DefaultHepRepIterator(HepRepInstanceTree instanceTree,
List layers)
Creates a HepRepIterator for the given InstanceTree and set of layers. |
|
DefaultHepRepIterator(HepRepInstanceTree instanceTree,
List layers,
boolean reportAllForLayerChange)
Creates a HepRepIterator for the given InstanceTree and set of layers. |
Method Summary | |
void |
addHepRepIteratorListener(HepRepIteratorListener l)
Add a listener to be informed about attribute changes while the iteration is ongoing. |
HepRepAttValue |
getAttValue(String key)
Returns the attValue for key at the current point of iteration. |
boolean |
hasNext()
Prepares the next instance and returns true if exists. |
Object |
next()
|
HepRepInstance |
nextInstance()
Returns next instance. |
void |
remove()
Removes the current instance, however this is not permitted. |
void |
removeHepRepIteratorListener(HepRepIteratorListener l)
Remove a listener. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultHepRepIterator(HepRepInstanceTree instanceTree)
instanceTree
- to be iterated over.public DefaultHepRepIterator(HepRepInstanceTree instanceTree, List layers)
instanceTree
- to be iterated over.layers
- to be used in iteration.public DefaultHepRepIterator(HepRepInstanceTree instanceTree, List layers, boolean reportAllForLayerChange)
instanceTree
- to be iterated over for given layers.layers
- to be used in iteration.reportAllForLayerChange
- true will report all attributes at every layer change.Method Detail |
public void addHepRepIteratorListener(HepRepIteratorListener l) throws TooManyListenersException
addHepRepIteratorListener
in interface HepRepIterator
l
- listener to be added.
TooManyListenersException
public void removeHepRepIteratorListener(HepRepIteratorListener l)
removeHepRepIteratorListener
in interface HepRepIterator
l
- listener to be removed.public HepRepAttValue getAttValue(String key)
HepRepIterator
getAttValue
in interface HepRepIterator
key
- name of tye attribute to be looked up.
public HepRepInstance nextInstance()
HepRepIterator
nextInstance
in interface HepRepIterator
public Object next()
next
in interface Iterator
public boolean hasNext()
hasNext
in interface HepRepIterator
public void remove() throws UnsupportedOperationException
remove
in interface Iterator
UnsupportedOperationException
- in all cases.
|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |