1 /* 2 * Copyright (c) 2002-2012, the original author or authors. 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 * 7 * http://www.opensource.org/licenses/bsd-license.php 8 */ 9 package jline.console.completer; 10 11 import java.util.ArrayList; 12 import java.util.Arrays; 13 import java.util.Collection; 14 import java.util.LinkedList; 15 import java.util.List; 16 17 import static jline.internal.Preconditions.checkNotNull; 18 19 /** 20 * Completer which contains multiple completers and aggregates them together. 21 * 22 * @author <a href="mailto:jason@planet57.com">Jason Dillon</a> 23 * @since 2.3 24 */ 25 public class AggregateCompleter 26 implements Completer 27 { 28 private final List<Completer> completers = new ArrayList<Completer>(); 29 30 public AggregateCompleter() { 31 // empty 32 } 33 34 /** 35 * Construct an AggregateCompleter with the given collection of completers. 36 * The completers will be used in the iteration order of the collection. 37 * | 1 /* 2 * Copyright (c) 2002-2012, the original author or authors. 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 * 7 * http://www.opensource.org/licenses/bsd-license.php 8 */ 9 package jdk.internal.jline.console.completer; 10 11 import java.util.ArrayList; 12 import java.util.Arrays; 13 import java.util.Collection; 14 import java.util.LinkedList; 15 import java.util.List; 16 17 import static jdk.internal.jline.internal.Preconditions.checkNotNull; 18 19 /** 20 * Completer which contains multiple completers and aggregates them together. 21 * 22 * @author <a href="mailto:jason@planet57.com">Jason Dillon</a> 23 * @since 2.3 24 */ 25 public class AggregateCompleter 26 implements Completer 27 { 28 private final List<Completer> completers = new ArrayList<Completer>(); 29 30 public AggregateCompleter() { 31 // empty 32 } 33 34 /** 35 * Construct an AggregateCompleter with the given collection of completers. 36 * The completers will be used in the iteration order of the collection. 37 * |