public abstract class Strategy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
CODE_ERROR |
static java.lang.Integer |
CODE_NO_CHANGE |
protected int |
depth |
NccGlobals |
globals |
Modifier | Constructor and Description |
---|---|
protected |
Strategy(NccGlobals globals)
Simple stratgies may pass in null for globals.
|
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<java.lang.Integer,java.util.List<NetObject>> |
doFor(Circuit c)
Method doFor(Circuit) process a single Circuit,
dividing the circuit according to this strategy, and
placing the NetObjects of the Circuit into new Circuits
mapped in the return according to the separation Integer.
|
LeafList |
doFor(EquivRecord rr)
Method doFor(EquivRecord) processes a single EquivRecord.
|
LeafList |
doFor(java.util.Iterator<EquivRecord> it) |
java.lang.Integer |
doFor(NetObject n)
doFor(NetObject) tests the NetObject to decide its catagory.
|
LeafList |
doFor(RecordList r)
Apply this Strategy to a list of leaf and internal records.
|
protected long |
elapsedTime() |
void |
error(boolean pred,
java.lang.String msg)
Die if error occurs
|
protected int |
getDepth() |
protected java.lang.String |
offspringStats(LeafList el) |
protected void |
startTime(java.lang.String strat,
java.lang.String target) |
public static final java.lang.Integer CODE_ERROR
public static final java.lang.Integer CODE_NO_CHANGE
protected int depth
public NccGlobals globals
protected Strategy(NccGlobals globals)
protected int getDepth()
public void error(boolean pred, java.lang.String msg)
pred
- true if error occursmsg
- message to print if error occurspublic LeafList doFor(RecordList r)
r
- a RecordList of EquivRecords to processpublic LeafList doFor(java.util.Iterator<EquivRecord> it)
public LeafList doFor(EquivRecord rr)
rr
- the EquivRecord to processpublic java.util.HashMap<java.lang.Integer,java.util.List<NetObject>> doFor(Circuit c)
c
- the Circuit to process.public java.lang.Integer doFor(NetObject n)
n
- the NetObject to catagorizeprotected java.lang.String offspringStats(LeafList el)
protected void startTime(java.lang.String strat, java.lang.String target)
protected long elapsedTime()