Example usage for org.apache.commons.collections4 IterableUtils emptyIterable

List of usage examples for org.apache.commons.collections4 IterableUtils emptyIterable

Introduction

In this page you can find the example usage for org.apache.commons.collections4 IterableUtils emptyIterable.

Prototype

@SuppressWarnings("unchecked") 
public static <E> Iterable<E> emptyIterable() 

Source Link

Document

Gets an empty iterable.

Usage

From source file:org.apache.metron.stellar.common.shell.DefaultStellarAutoCompleter.java

@Override
public Iterable<String> autoComplete(String buffer) {
    Iterable<String> candidates = IterableUtils.emptyIterable();

    final String lastToken = getLastToken(buffer);
    if (StringUtils.isNotEmpty(lastToken)) {

        if (isDoc(lastToken)) {
            candidates = autoCompleteDoc(lastToken.substring(1));

        } else if (isMagic(lastToken)) {
            candidates = autoCompleteMagic(lastToken);

        } else {/*ww  w  . jav  a  2 s.c  o m*/
            candidates = autoCompleteNormal(lastToken);
        }
    }

    return candidates;
}