NullCompletor.java revision 3aa4d1f0c4f24e2d2788ec9886de8a5ca3cd806b
1/*
2 * Copyright (c) 2002-2007, Marc Prud'hommeaux. All rights reserved.
3 *
4 * This software is distributable under the BSD license. See the terms of the
5 * BSD license in the documentation provided with this software.
6 */
7package jline;
8
9import java.util.*;
10
11/**
12 *  <p>
13 *  A completor that does nothing. Useful as the last item in an
14 *  {@link ArgumentCompletor}.
15 *  </p>
16 *
17 *  @author  <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a>
18 */
19public class NullCompletor implements Completor {
20    /**
21     *  Returns -1 always, indicating that the the buffer is never
22     *  handled.
23     */
24    public int complete(final String buffer, int cursor, List candidates) {
25        return -1;
26    }
27}
28