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

## uk.ac.man.bioinf.sequence
Interface EditableSequence

All Superinterfaces:
  Identifiable, MutableSequence, Sequence, SequenceEventProvider

All Known Subinterfaces:
  ComplexEditableGappedSequence

All Known Implementing Classes:
  AbstractEditableSequence, DefaultEditableSequence

public interface EditableSequence
extends MutableSequence

EditableSequence.java Created: Wed Mar 1 19:39:40 2000

Version:
  $Id: EditableSequence.java,v 1.5 2001/04/11 17:04:43 lord Exp $
Author:
  Phillip Lord

Method Summary
`Element` | `deleteElementAt(int index)` Delete the element at index.
`Element[]` | `deleteElementAt(int index, int length)` Delete the elements starting at index for the specified length
`void` | `insertElementAt(Element[] element, int index)` Inserts the elements at this position.
`void` | `insertElementAt(Element element, int index)` Insert the element at the specified index.
`Element[]` | `setElementAt(Element[] element, int index)`
`Element` | `setElementAt(Element element, int index)` Sets the value of the element at the specified index.

Methods inherited from interface uk.ac.man.bioinf.sequence.Sequence
`getElementAt, getElementAtAsChar, getLength, getSequenceAsChars, getSequenceAsElements, getSequenceType, getSubSequence`

Methods inherited from interface uk.ac.man.bioinf.sequence.identifier.Identifiable
`getIdentifier`

Methods inherited from interface uk.ac.man.bioinf.sequence.event.SequenceEventProvider
`addSequenceListener, addVetoableSequenceListener, removeSequenceListener, removeVetoableSequenceListener`

Method Detail

### setElementAt

    public Element setElementAt(Element element,
                                int index)
                         throws NoSuchSequenceElementException,
                                SequenceVetoException

  Sets the value of the element at the specified index.

  Parameters:
    `element` -
    `index` -
  Returns:
    the old value
  Throws:
    `NoSuchSequenceElementException` - if the element does not exist (index greater that length + 1 or less than 1)
    `SequenceVetoException` - if some listener doesnt like this

### setElementAt

    public Element[] setElementAt(Element[] element,
                                  int index)
                           throws NoSuchSequenceElementException,
                                  SequenceVetoException

    `NoSuchSequenceElementException`
    `SequenceVetoException`

### insertElementAt

    public void insertElementAt(Element element,
                                int index)
                         throws NoSuchSequenceElementException,
                                SequenceVetoException

  Insert the element at the specified index. After insertion getElementAt( index ) will return element, and the sequence will be longer by one

  Parameters:
    `element` - the element to insert
    `index` - the index at which to insert
    `NoSuchSequenceElementException`
    `SequenceVetoException`

### insertElementAt

    public void insertElementAt(Element[] element,
                                int index)
                         throws NoSuchSequenceElementException,
                                SequenceVetoException

  Inserts the elements at this position. If the index is one longer than the length of the sequence the sequence will be extended.

  Parameters:
    `element` - the elements to insert
    `index` - the index at which to insert
  Throws:
    `NoSuchSequenceElementException` - if the element does not exist, which will be the case if index is less than 1 or greater than sequence length + 1
    `SequenceVetoException`

### deleteElementAt

    public Element deleteElementAt(int index)
                            throws NoSuchSequenceElementException,
                                   SequenceVetoException

  Delete the element at index.

  Parameters:
    `index` - the index to delete
  Returns:
    the element which has just been deleted
  Throws:
    `NoSuchSequenceElementException` - if index is less than 1 or greater than the length of the sequence
    `SequenceVetoException`

### deleteElementAt

    public Element[] deleteElementAt(int index,
                                     int length)
                              throws NoSuchSequenceElementException,
                                     SequenceVetoException

  Delete the elements starting at index for the specified length

  Parameters:
    `index` - the index to start at
    `length` - the length to delete
  Returns:
    the elements just deleted
  Throws:
    `NoSuchSequenceElementException` - if the elements do not all exist, so if index is less than 1, or index + length is greater than the length of the sequence
    `SequenceVetoException`

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