com.sun.electric.tool.generator.layout
Class PortFilter

java.lang.Object
  extended by com.sun.electric.tool.generator.layout.PortFilter
Direct Known Subclasses:
PortFilter.SchemPortFilter

public abstract class PortFilter
extends java.lang.Object

A PortFilter is useful for removing certain PortInsts from the list of PortInsts on a Network. It is built into Jose because certain filters are commonly needed by Jose clients.


Nested Class Summary
static class PortFilter.SchemPortFilter
          Skip uninteresting elements of a schematic.
 
Field Summary
static PortFilter SCHEMATIC
          This constant object can be invoked on the return value of Network.getPorts() omit PortInsts of the schematic elements that are typically uninteresting to Jose clients reading schematics.
 
Constructor Summary
PortFilter()
           
 
Method Summary
 java.util.Iterator<PortInst> filter(java.util.Iterator<PortInst> ports)
          Remove selected PortInsts from the input list
abstract  boolean skipPort(PortInst pi)
          Should we filter out this PortInst?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMATIC

public static final PortFilter SCHEMATIC
This constant object can be invoked on the return value of Network.getPorts() omit PortInsts of the schematic elements that are typically uninteresting to Jose clients reading schematics. The following code describes a typical use: Network net = // application initializes this variable Iterator ports = PortFilter.SCHEMATIC.filter(net.getPorts()); while (ports.hasNext()) { // application only looks at "useful" schematics ports }

Constructor Detail

PortFilter

public PortFilter()
Method Detail

skipPort

public abstract boolean skipPort(PortInst pi)
Should we filter out this PortInst?


filter

public final java.util.Iterator<PortInst> filter(java.util.Iterator<PortInst> ports)
Remove selected PortInsts from the input list

Parameters:
ports - an iterator over a collection of PortInsts. Note that after filter() is called ports.hasNext()==false;
Returns:
all PortInsts in ports except those excluded by skipPort()