|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.motifDiscovery.history.CappedHistory
public class CappedHistory
This class combines a threshold on the number of steps which can be performed with any other History
.
Using a threshold ensures to converge using any other history.
Constructor Summary | |
---|---|
CappedHistory(int t,
History h)
This constructor creates an instance that allows at most t steps using the history h . |
Method Summary | |
---|---|
void |
clear()
This method clears the history, i.e. it removes all operations from the history. |
CappedHistory |
clone()
This method returns a deep copy of the instance |
boolean |
operationAllowed(int... op)
Returns true if the specified operation is allowed, i.e. it does not conflict with any operation from the history. |
void |
operationPerfomed(int... op)
This method puts an operation to the history. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CappedHistory(int t, History h) throws CloneNotSupportedException
t
steps using the history h
.
t
- the maximal number of steps/operationsh
- the underlying history
CloneNotSupportedException
- is the history h
could not be clonedMethod Detail |
---|
public CappedHistory clone() throws CloneNotSupportedException
History
clone
in interface History
clone
in class Object
CloneNotSupportedException
- if not possibleCloneable
,
Object.clone()
public void clear()
History
clear
in interface History
public boolean operationAllowed(int... op)
History
true
if the specified operation is allowed, i.e. it does not conflict with any operation from the history.
operationAllowed
in interface History
op
- the operation to be tested
true
if the specified operation is allowedpublic void operationPerfomed(int... op)
History
operationPerfomed
in interface History
op
- the performed operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |