com.sun.electric.database.topology
Class RTNode.Search
java.lang.Object
com.sun.electric.database.topology.RTNode.Search
- All Implemented Interfaces:
- java.util.Iterator<RTBounds>
- Enclosing class:
- RTNode
public static class RTNode.Search
- extends java.lang.Object
- implements java.util.Iterator<RTBounds>
Class to search a given area of a Cell.
This class acts like an Iterator, returning RTBounds objects that are inside the selected area.
For example, here is the code to search cell "myCell" in the area "bounds" (in database coordinates):
for(RTNode.Search sea = new RTNode.Search(bounds, cell); sea.hasNext(); )
{
Geometric geom = (Geometric)sea.next();
if (geom instanceof NodeInst)
{
NodeInst ni = (NodeInst)geom;
// process NodeInst ni in the selected area
} else
{
ArcInst ai = (ArcInst)geom;
// process ArcInst ai in the selected area
}
}
Constructor Summary |
RTNode.Search(java.awt.geom.Rectangle2D bounds,
RTNode root,
boolean includeEdges)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RTNode.Search
public RTNode.Search(java.awt.geom.Rectangle2D bounds,
RTNode root,
boolean includeEdges)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<RTBounds>
next
public RTBounds next()
- Specified by:
next
in interface java.util.Iterator<RTBounds>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<RTBounds>