org.pcollections

## Interface PStack<E>

Type Parameters:
  `E` -

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

All Known Implementing Classes:
  ConsPStack

    public interface PStack<E>
    extends PSequence<E>

An immutable, persistent stack.

### Method Summary

Methods
`PStack<E>` `minus(int i)`
`PStack<E>` `minus(Object e)` Returns a sequence consisting of the elements of this without the first occurrence of e.
`PStack<E>` `minusAll(Collection<?> list)`
`PStack<E>` `plus(E e)` Returns a stack consisting of the elements of this with e prepended.
`PStack<E>` `plus(int i, E e)`
`PStack<E>` `plusAll(Collection<? extends E> list)` Returns a stack consisting of the elements of this with list prepended in reverse.
`PStack<E>` `plusAll(int i, Collection<? extends E> list)`
`PStack<E>` `subList(int start)`
`PStack<E>` `subList(int start, int end)`
`PStack<E>` `with(int i, E e)`

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

`add, addAll, remove, set`

### 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

    PStack<E> plus(E e)

Returns a stack consisting of the elements of this with e prepended.

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

#### plusAll

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

Returns a stack consisting of the elements of this with list prepended in reverse.

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

#### with

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

Specified by:
  `with` in interface `PSequence<E>`
Returns:
  a sequence consisting of the elements of this with e replacing the element at index i.

#### plus

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

Specified by:
  `plus` in interface `PSequence<E>`
  `e` - non-null
Returns:
  a sequence consisting of the elements of this with e inserted at index i.

#### plusAll

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

Specified by:
  `plusAll` in interface `PSequence<E>`
Returns:
  a sequence consisting of the elements of this with list inserted at index i.

#### minus

    PStack<E> minus(Object e)

Description copied from interface: `PSequence`
Returns a sequence consisting of the elements of this without the first occurrence of e.

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

#### minusAll

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

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

#### minus

    PStack<E> minus(int i)

Specified by:
  `minus` in interface `PSequence<E>`
Returns:
  a sequence consisting of the elements of this with the element at index i removed.

#### subList

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

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

#### subList

    PStack<E> subList(int start)

Parameters:
  `start` -
Returns:
  subList(start, this.size())

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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