storage.support
Interface SequenceContentEditor

All Superinterfaces:
ContentEditor

public interface SequenceContentEditor
extends ContentEditor

The fundamental interface for modifying the contents of SequenceContent objects in the Storage interface.

Author:
Lee Iverson

Method Summary
 Setter insertAfter(int index)
          Create a Setter that will insert a value/sequence after the location specified by index.
 Setter insertBefore(int index)
          Create a Setter that will insert a value/sequence at the location specified by index.
 Setter replaceRange(int startIndex, int endIndex)
          Create a Setter that will assign a value/sequence to the range from [startIndex, endIndex] inclusive.
 Setter setItem(int i)
          Create a Setter that will assign a value to the item at the given index.
 
Methods inherited from interface storage.support.ContentEditor
apply, setValue
 

Method Detail

setItem

public Setter setItem(int i)
               throws IndexBoundsException

Create a Setter that will assign a value to the item at the given index.

If the index is invalid, then an IndexBoundsException is thrown.

Throws:
IndexBoundsException

replaceRange

public Setter replaceRange(int startIndex,
                           int endIndex)
                    throws IndexBoundsException

Create a Setter that will assign a value/sequence to the range from [startIndex, endIndex] inclusive.

The Setter will also remove the values in the specified range if it is subsequently called with a null argument.

If either index or the range is invalid, then an IndexBoundsException is thrown. The range [0,-1], which selects the entire Sequence is always valid, even if empty.

Throws:
IndexBoundsException

insertBefore

public Setter insertBefore(int index)
                    throws IndexBoundsException

Create a Setter that will insert a value/sequence at the location specified by index.

If the index is invalid, then an IndexBoundsException is thrown. For this operation, the index 0 is always valid.

Throws:
IndexBoundsException

insertAfter

public Setter insertAfter(int index)
                   throws IndexBoundsException

Create a Setter that will insert a value/sequence after the location specified by index.

If the index is invalid, then an IndexBoundsException is thrown. For this operation, the index -1 is always valid.

Throws:
IndexBoundsException