MultiCompletor
Date: 2015-12-09

jline

## Class MultiCompletor

- java.lang.Object
- - jline.MultiCompletor

- All Implemented Interfaces:
    Completor

      public class MultiCompletor
      extends java.lang.Object
      implements Completor

  A completor that contains multiple embedded completors. This differs from the `ArgumentCompletor`, in that the nested completors are dispatched individually, rather than delimited by arguments.

  Author:
    Marc Prud'hommeaux

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiCompletor()` Construct a MultiCompletor with no embedded completors.
    `MultiCompletor(Completor[] completors)` Construct a MultiCompletor with the specified `Completor` instances.
    `MultiCompletor(java.util.List completors)` Construct a MultiCompletor with the specified list of `Completor` instances.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `complete(java.lang.String buffer, int pos, java.util.List cand)` Populates candidates with a list of possible completions for the buffer.
    `Completor[]` | `getCompletors()`
    `void` | `setCompletors(Completor[] completors)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MultiCompletor

          public MultiCompletor()

      Construct a MultiCompletor with no embedded completors.

    - #### MultiCompletor

          public MultiCompletor(java.util.List completors)

      Construct a MultiCompletor with the specified list of `Completor` instances.

    - #### MultiCompletor

          public MultiCompletor(Completor[] completors)

      Construct a MultiCompletor with the specified `Completor` instances.

  - ### Method Detail

    - #### complete

          public int complete(java.lang.String buffer,
                     int pos,
                     java.util.List cand)

      Description copied from interface: `Completor`
      Populates candidates with a list of possible completions for the buffer. The candidates list will not be sorted before being displayed to the user: thus, the complete method should sort the `List` before returning.
      Specified by:
        `complete` in interface `Completor`
      Parameters:
        `buffer` - the buffer
        `cand` - the `List` of candidates to populate
      Returns:
        the index of the buffer for which the completion will be relative

    - #### setCompletors

          public void setCompletors(Completor[] completors)

    - #### getCompletors

          public Completor[] getCompletors()