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.models.discrete.inhomogeneous
Class SequenceIterator

    java.lang.Object
      de.jstacs.models.discrete.inhomogeneous.SequenceIterator

All Implemented Interfaces:
  Cloneable

    public class SequenceIterator

extends Object
implements Cloneable

This class is used to iterate over a discrete sequence.

Author:
  Jens Keilwagen

Constructor Summary
`SequenceIterator(int length)` Creates a new `SequenceIterator` with maximal `length`.

Method Summary
`SequenceIterator` | `clone()`
`boolean` | `next()` Changes the internal sequence representation to the next sequence.
`void` | `reset()` Resets the internal sequence representation.
`void` | `setBounds(int[] bounds)` This method sets the bounds for each position.
`boolean` | `skip(int firstPos)` This method skips some position.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SequenceIterator

    public SequenceIterator(int length)

  Creates a new `SequenceIterator` with maximal `length`.

  Parameters:
    `length` - the maximal length of the sequence

Method Detail

### clone

    public SequenceIterator clone()
                           throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

### next

    public boolean next()

  Changes the internal sequence representation to the next sequence.

  Returns:
    `true` if the new sequence is correct, otherwise `false`

### reset

    public void reset()

  Resets the internal sequence representation. So the `SequenceIterator` starts again.

### setBounds

    public void setBounds(int[] bounds)

  This method sets the bounds for each position. It does not copy the array and it does not proof `bounds.length <= length`. This has to be ensured by the user.

  Parameters:
    `bounds` - the array with bounds for each position

### skip

    public boolean skip(int firstPos)

  This method skips some position.

  Parameters:
    `firstPos` - the first position that is interesting
  Returns:
    `true` if the internal sequence is from the scope, `false` otherwise

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