public class NoRevertHistory extends Object implements History
CappedHistory| Constructor and Description |
|---|
NoRevertHistory()
This constructor creates an instance that allows to shift shrink and expand the motif.
|
NoRevertHistory(boolean allowShift,
boolean allowShrink,
boolean allowExpand)
This constructor creates an instance with user specified allowed operations.
|
NoRevertHistory(StringBuffer xml)
This is the constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
This method clears the history, i.e.
|
NoRevertHistory |
clone()
This method returns a deep copy of the instance
|
boolean |
operationAllowed(int... op)
Returns
true if the specified operation is allowed, i.e. |
void |
operationPerfomed(int... op)
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. |
public NoRevertHistory()
public NoRevertHistory(boolean allowShift,
boolean allowShrink,
boolean allowExpand)
allowShift - whether it is allowed to shift the motifallowShrink - whether it is allowed to shrink the motifallowExpand - whether it is allowed to expand the motifpublic NoRevertHistory(StringBuffer xml) throws NonParsableException
Storable.xml - the XML representation as StringBufferNonParsableException - if the XML representation could not be parsedpublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.public NoRevertHistory clone() throws CloneNotSupportedException
Historyclone in interface Historyclone in class ObjectCloneNotSupportedException - if not possibleCloneable,
Object.clone()public void clear()
Historypublic boolean operationAllowed(int... op)
Historytrue if the specified operation is allowed, i.e. it does not conflict with any operation from the history.operationAllowed in interface Historyop - the operation to be testedtrue if the specified operation is allowedpublic void operationPerfomed(int... op)
HistoryoperationPerfomed in interface Historyop - the performed operation