diff options
Diffstat (limited to 'src/jline/src/main/java/jline/NullCompletor.java')
-rw-r--r-- | src/jline/src/main/java/jline/NullCompletor.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/jline/src/main/java/jline/NullCompletor.java b/src/jline/src/main/java/jline/NullCompletor.java new file mode 100644 index 0000000000..aa6cdf744e --- /dev/null +++ b/src/jline/src/main/java/jline/NullCompletor.java @@ -0,0 +1,27 @@ +/* + * 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 jline; + +import java.util.*; + +/** + * <p> + * A completor that does nothing. Useful as the last item in an + * {@link ArgumentCompletor}. + * </p> + * + * @author <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a> + */ +public class NullCompletor implements Completor { + /** + * Returns -1 always, indicating that the the buffer is never + * handled. + */ + public int complete(final String buffer, int cursor, List candidates) { + return -1; + } +} |