|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ChromAb.CycleRecord
Keeps an ordered list of cycles and counts the number of occurances. Cycles stored in decreasing order.
Nested Class Summary | |
private class |
CycleRecord.Entry
Private class that stores an entry in the Cycle record. |
Field Summary | |
private java.util.Vector |
record
|
Constructor Summary | |
CycleRecord()
|
Method Summary | |
boolean |
add(Cycle cycle)
Method to add a cycle to the cycle record. |
int |
countAt(int index)
Returns the number of cycles at the specified index |
Cycle |
cycleAt(int index)
Returns the cycle at the specified index. |
java.lang.String |
displayWithPercent()
Returns a String which lists the cycles in the record with percentages of total |
private CycleRecord.Entry |
entryAt(int index)
Returns the Entry object (private to this class) for the specified index. |
private void |
incrementCount(int index)
Increments the counter of the entry at the specified index. |
Cycle |
obligate()
Returns the obligate cycle in the record. |
java.lang.String |
toString()
|
int |
totalNumberOfCycles()
Returns the total number of cycles in the record. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.Vector record
Constructor Detail |
public CycleRecord()
Method Detail |
public boolean add(Cycle cycle)
cycle
- cycle to add to record
private CycleRecord.Entry entryAt(int index)
index
- index value
public Cycle cycleAt(int index)
index
- index value
public int countAt(int index)
index
- index value
private void incrementCount(int index)
index
- index valuepublic Cycle obligate()
public java.lang.String toString()
toString
in class java.lang.Object
public int totalNumberOfCycles()
public java.lang.String displayWithPercent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |