## org.gjt.sp.jedit.bufferset
Class BufferSet

    java.lang.Object
      org.gjt.sp.jedit.bufferset.BufferSet

    public class BufferSet

extends java.lang.Object

A BufferSet is an ordered list of buffers.

Since:
  jEdit 4.3pre15

Nested Class Summary
`static class` `BufferSet.Scope`

Constructor Summary
`BufferSet()` Create a new BufferSet.

Method Summary
`void` `addBufferAt(Buffer buffer, int position)`
`void` `addBufferSetListener(BufferSetListener listener)` Add a BufferSetListener.
`Buffer[]` `getAllBuffers()` Returns an array of all buffers in this bufferSet.
`void` `getAllBuffers(BufferSetListener listener)`
`Buffer` `getBuffer(int index)` Returns the Buffer at the given index.
`Buffer` `getNextBuffer(int index)`
`Buffer` `getPreviousBuffer(int index)`
`boolean` `hasListeners()` Check if the BufferSet has listeners.
`int` `indexOf(Buffer buffer)`
`void` `removeBufferSetListener(BufferSetListener listener)` Remove a BufferSetListener.
`int` `size()`
`java.lang.String` `toString()`

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

Constructor Detail

### BufferSet

    public BufferSet()

  Create a new BufferSet.

Method Detail

### addBufferAt

    public void addBufferAt(Buffer buffer,
                            int position)

### getBuffer

    public Buffer getBuffer(int index)

  Returns the Buffer at the given index.

  Parameters:
    `index` - the index. The index must exists
  Returns:
    the buffer at the index.

### getPreviousBuffer

    public Buffer getPreviousBuffer(int index)

### getNextBuffer

    public Buffer getNextBuffer(int index)

### indexOf

    public int indexOf(Buffer buffer)

### size

    public int size()

### getAllBuffers

    public void getAllBuffers(BufferSetListener listener)

### getAllBuffers

    public Buffer[] getAllBuffers()

  Returns an array of all buffers in this bufferSet.

  Returns:
    an array of all Buffers

### addBufferSetListener

    public void addBufferSetListener(BufferSetListener listener)

  Add a BufferSetListener.

  Parameters:
    `listener` - the new BufferSetListener

### removeBufferSetListener

    public void removeBufferSetListener(BufferSetListener listener)

  Remove a BufferSetListener. If there are no listeners anymore, remove all buffers from the bufferSet.

  Parameters:
    `listener` - the removed BufferSetListener

### hasListeners

    public boolean hasListeners()

  Check if the BufferSet has listeners.

  Returns:
    true if the bufferSet has listeners

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`