1 /** 2 * jline - Java console input library 3 * Copyright (c) 2002,2003 Marc Prud'hommeaux mwp1@cornell.edu 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 package jline; 20 21 import java.io.*; 22 import java.util.*; 23 24 /** 25 * <p> 26 * A completor that does nothing. Useful as the last item in an 27 * {@link ArgumentCompletor}. 28 * </p> 29 * 30 * @author <a HREF="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a> 31 */ 32 public class NullCompletor 33 implements Completor 34 { 35 /** 36 * Returns -1 always, indicating that the the buffer is never 37 * handled. 38 */ 39 public int complete (String buffer, int cursor, List candidates) 40 { 41 return -1; 42 } 43 } 44