public abstract class PortFilter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PortFilter.SchemPortFilter
Skip uninteresting elements of a schematic.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
PortFilter() |
Modifier and Type | Method and Description |
---|---|
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?
|
public static final PortFilter SCHEMATIC
Network net = // application initializes this variable
Iterator ports = PortFilter.SCHEMATIC.filter(net.getPorts());
while (ports.hasNext()) {
// application only looks at "useful" schematics ports
}
public abstract boolean skipPort(PortInst pi)
public final java.util.Iterator<PortInst> filter(java.util.Iterator<PortInst> ports)
ports
- an iterator over a collection of PortInsts. Note
that after filter() is called ports.hasNext()==false;