|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.motifDiscovery.history.SimpleHistory
public class SimpleHistory
This class implements a simple history that has a limited memory that will be
used cyclicly. Only operations are allowed, that are not a priorily forbidden
and the complementary operation has not been performed before (in the local
history) except shrink operations. The last point helps to keep the motifs short
that will be found.
This history may not cause an termination of the motif discovery.
CappedHistory
Constructor Summary | |
---|---|
SimpleHistory(int slots)
This constructor creates a simple history with limited memory. |
|
SimpleHistory(int slots,
boolean allowShift,
boolean allowShrink,
boolean allowExpand)
This constructor creates a simple history with limited memory. |
|
SimpleHistory(StringBuffer xml)
This is the constructor for the interface Storable . |
Method Summary | |
---|---|
void |
clear()
This method clears the history, i.e. it removes all operations from the history. |
SimpleHistory |
clone()
This method returns a deep copy of the instance |
boolean |
operationAllowed(int... operation)
Returns true if the specified operation is allowed, i.e. it does not conflict with any operation from the history. |
void |
operationPerfomed(int... operation)
This method puts an operation to the history. |
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleHistory(int slots)
slots
- the number of memory slotsSimpleHistory(int, boolean, boolean, boolean)
public SimpleHistory(int slots, boolean allowShift, boolean allowShrink, boolean allowExpand)
slots
- the number of memory slotsallowShift
- if true shifts are allowallowShrink
- if true shrinks are allowallowExpand
- if true expands are allowpublic SimpleHistory(StringBuffer xml) throws NonParsableException
Storable
.
xml
- the XML representation as StringBuffer
NonParsableException
- if the XML representation could not be parsedMethod Detail |
---|
public StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
toXML
in interface Storable
public boolean operationAllowed(int... operation)
History
true
if the specified operation is allowed, i.e. it does not conflict with any operation from the history.
operationAllowed
in interface History
operation
- the operation to be tested
true
if the specified operation is allowedpublic void operationPerfomed(int... operation)
History
operationPerfomed
in interface History
operation
- the performed operationpublic void clear()
History
clear
in interface History
public SimpleHistory clone() throws CloneNotSupportedException
History
clone
in interface History
clone
in class Object
CloneNotSupportedException
- if not possibleCloneable
,
Object.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |