org.pcollections

## Interface PSequence<E>

Type Parameters:
  `E` -

All Superinterfaces:
  Collection<E>, Iterable<E>, List<E>, PCollection<E>

All Known Subinterfaces:
  PStack<E>, PVector<E>

All Known Implementing Classes:
  ConsPStack, TreePVector

    public interface PSequence<E>
    extends PCollection<E>, List<E>

An immutable, persistent indexed collection.

### Method Summary

Methods
`void` `add(int index, E element)` Deprecated.
`boolean` `addAll(int index, Collection<? extends E> c)` Deprecated.
`PSequence<E>` `minus(int i)`
`PSequence<E>` `minus(Object e)` Returns a sequence consisting of the elements of this without the first occurrence of e.
`PSequence<E>` `minusAll(Collection<?> list)`
`PSequence<E>` `plus(E e)`
`PSequence<E>` `plus(int i, E e)`
`PSequence<E>` `plusAll(Collection<? extends E> list)`
`PSequence<E>` `plusAll(int i, Collection<? extends E> list)`
`E` `remove(int index)` Deprecated.
`E` `set(int index, E element)` Deprecated.
`PSequence<E>` `subList(int start, int end)`
`PSequence<E>` `with(int i, E e)`

### Methods inherited from interface org.pcollections.PCollection

`add, addAll, clear, remove, removeAll, retainAll`

### Methods inherited from interface java.util.List

`add, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, size, toArray, toArray`

### Method Detail

#### plus

    PSequence<E> plus(E e)

Specified by:
  `plus` in interface `PCollection<E>`
Parameters:
  `e` - non-null
Returns:
  a collection which contains e and all of the elements of this

#### plusAll

    PSequence<E> plusAll(Collection<? extends E> list)

Specified by:
  `plusAll` in interface `PCollection<E>`
Parameters:
  `list` - contains no null elements
Returns:
  a collection which contains all of the elements of list and this

#### with

    PSequence<E> with(int i,
                    E e)

Parameters:
  `i` -
  `e` -
Returns:
  a sequence consisting of the elements of this with e replacing the element at index i.
Throws:
  `IndexOutOfBOundsException` - if i<0 || i>=this.size()

#### plus

    PSequence<E> plus(int i,
                    E e)

Parameters:
  `i` -
  `e` - non-null
Returns:
  a sequence consisting of the elements of this with e inserted at index i.
Throws:
  `IndexOutOfBOundsException` - if i<0 || i>this.size()

#### plusAll

    PSequence<E> plusAll(int i,
                       Collection<? extends E> list)

Parameters:
  `i` -
  `list` -
Returns:
  a sequence consisting of the elements of this with list inserted at index i.
Throws:
  `IndexOutOfBOundsException` - if i<0 || i>this.size()

#### minus

    PSequence<E> minus(Object e)

Returns a sequence consisting of the elements of this without the first occurrence of e.

Specified by:
  `minus` in interface `PCollection<E>`
Returns:
  this with a single instance of e removed, if e is in this

#### minusAll

    PSequence<E> minusAll(Collection<?> list)

Specified by:
  `minusAll` in interface `PCollection<E>`
Returns:
  this with all elements of list completely removed

#### minus

    PSequence<E> minus(int i)

Parameters:
  `i` -
Returns:
  a sequence consisting of the elements of this with the element at index i removed.
Throws:
  `IndexOutOfBOundsException` - if i<0 || i>=this.size()

#### subList

    PSequence<E> subList(int start,
                       int end)

Specified by:
  `subList` in interface `List<E>`

#### addAll

    @Deprecated
    boolean addAll(int index,
                            Collection<? extends E> c)

Deprecated.

Specified by:
  `addAll` in interface `List<E>`

#### set

    @Deprecated
    E set(int index,
                   E element)

Deprecated.

Specified by:
  `set` in interface `List<E>`

#### add

    @Deprecated
    void add(int index,
                      E element)

Deprecated.

Specified by:
  `add` in interface `List<E>`

#### remove

    @Deprecated
    E remove(int index)

Deprecated.

Specified by:
  `remove` in interface `List<E>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015