All Downloads are FREE. Search and download functionalities are using the official Maven repository.

qcloud.storage.ranger.thirdparty.jline.Completor Maven / Gradle / Ivy

There is a newer version: 3.3.0-4.1
Show newest version
/*
 * Copyright (c) 2002-2007, Marc Prud'hommeaux. All rights reserved.
 *
 * This software is distributable under the BSD license. See the terms of the
 * BSD license in the documentation provided with this software.
 */
package qcloud.storage.ranger.thirdparty.jline;

import java.util.*;

/**
 *  A Completor is the mechanism by which tab-completion candidates
 *  will be resolved.
 *
 *  @author  Marc Prud'hommeaux
 */
public 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
     *  {@link List} before returning.
     *
     *
     *  @param  buffer     the buffer
     *  @param  candidates the {@link List} of candidates to populate
     *  @return            the index of the buffer for which
     *                     the completion will be relative
     */
    int complete(String buffer, int cursor, List candidates);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy