Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.motifDiscovery.history
Class NoRevertHistory

    java.lang.Object
      de.jstacs.motifDiscovery.history.NoRevertHistory

All Implemented Interfaces:
  History, Cloneable

    public class NoRevertHistory

extends Object
implements History

This class implements a history that allows operations, that are not a priorily forbidden and do not create a configuration that has already be considered. If not a priorily forbidden shrink operations are always allowed.
This history may not cause an termination of the motif discovery.

Author:
  Jan Grau, Jens Keilwagen
See Also:
  `CappedHistory`

Constructor Summary
`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.

Method Summary
`void` | `clear()` This method clears the history, i.e. it removes all operations from the history.
`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. 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

### NoRevertHistory

    public NoRevertHistory()

  This constructor creates an instance that allows to shift shrink and expand the motif.

### NoRevertHistory

    public NoRevertHistory(boolean allowShift,
                           boolean allowShrink,
                           boolean allowExpand)

  This constructor creates an instance with user specified allowed operations.

  Parameters:
    `allowShift` - whether it is allowed to shift the motif
    `allowShrink` - whether it is allowed to shrink the motif
    `allowExpand` - whether it is allowed to expand the motif

Method Detail

### clone

    public NoRevertHistory clone()
                          throws CloneNotSupportedException

  Description copied from interface: `History`
  This method returns a deep copy of the instance

  Specified by:
    `clone` in interface `History`
  Overrides:
    `clone` in class `Object`
  Returns:
    a deep copy
  Throws:
    `CloneNotSupportedException` - if not possible
  See Also:
    `Cloneable`, `Object.clone()`

### clear

    public void clear()

  Description copied from interface: `History`
  This method clears the history, i.e. it removes all operations from the history.

  Specified by:
    `clear` in interface `History`

### operationAllowed

    public boolean operationAllowed(int... op)

  Description copied from interface: `History`
  Returns `true` if the specified operation is allowed, i.e. it does not conflict with any operation from the history.

  Specified by:
    `operationAllowed` in interface `History`
  Parameters:
    `op` - the operation to be tested
  Returns:
    `true` if the specified operation is allowed

### operationPerfomed

    public void operationPerfomed(int... op)

  Description copied from interface: `History`
  This method puts an operation to the history.

  Specified by:
    `operationPerfomed` in interface `History`
  Parameters:
    `op` - the performed operation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD