Example usage for com.google.common.collect Lists newLinkedList

List of usage examples for com.google.common.collect Lists newLinkedList

Introduction

In this page you can find the example usage for com.google.common.collect Lists newLinkedList.

Prototype

@GwtCompatible(serializable = true)
public static <E> LinkedList<E> newLinkedList() 

Source Link

Document

Creates a mutable, empty LinkedList instance (for Java 6 and earlier).

Usage

From source file:org.apache.kylin.tool.metrics.systemcube.KylinTableCreator.java

public static TableDesc generateKylinTableForMetricsJob(KylinConfig kylinConfig, SinkTool sinkTool) {
    List<Pair<String, String>> columns = Lists.newLinkedList();
    columns.addAll(HiveTableCreator.getHiveColumnsForMetricsJob());
    columns.addAll(HiveTableCreator.getPartitionKVsForHiveTable());
    return generateKylinTable(sinkTool, kylinConfig.getKylinMetricsSubjectJob(), columns);
}

From source file:indigo.impl.json.AbstractConflictResolutionPolicy.java

@Override
public List<String> dumpResolutions() {
    List<String> output = Lists.newLinkedList();
    for (Entry<String, Value> entry : conflictResolution.entrySet()) {
        output.add(entry.getKey() + ": " + entry.getValue());
    }//from   w  w w  .ja va2 s  .com
    return output;
}

From source file:org.eclipse.emf.compare.tests.match.data.MatchInputData.java

public List<Resource> getRootIDTwoWayA2Left() throws IOException {
    List<Resource> result = Lists.newLinkedList();
    result.add(loadFromClassLoader("rootid/twoway/a2/left.nodes"));
    result.add(loadFromClassLoader("rootid/twoway/a2/left2.nodes"));
    return result;
}

From source file:com.jeroensteenbeeke.andalite.forge.ui.renderer.ScriptedQuestionRenderer.java

public static Builder forAnswers(Object first, Object... rest) {
    List<Object> answers = Lists.newLinkedList();
    answers.add(first);/* w  w w .j  ava 2 s.c o m*/
    for (Object object : rest) {
        answers.add(object);
    }

    return new Builder(answers);
}

From source file:com.griddynamics.jagger.master.TaskExecutionStatusProvider.java

public Collection<Map.Entry<String, TaskData.ExecutionStatus>> getTasksWithStatus(
        final TaskData.ExecutionStatus status) {
    Preconditions.checkNotNull(status);//from   w  ww. j  a  v a  2  s  .co m

    List<Map.Entry<String, TaskData.ExecutionStatus>> ret = Lists.newLinkedList();
    for (Map.Entry<String, TaskData.ExecutionStatus> entry : statusMap.entrySet()) {
        if (status.equals(entry.getValue())) {
            ret.add(entry);
        }
    }

    return ret;
}

From source file:ru.frostman.web.plugin.Plugin.java

public List<InjectionRule> getInjections() {
    return Lists.newLinkedList();
}

From source file:cc.recommenders.io.ReadingArchive.java

@Override
public <T> List<T> getAll(Class<T> c) {
    List<T> out = Lists.newLinkedList();
    while (hasNext()) {
        out.add(getNext(c));/*from ww  w .  ja v a  2  s .  co m*/
    }
    return out;
}

From source file:com.ansorgit.plugins.bash.editor.highlighting.codeHighlighting.RemoveHeredocHighlightingPass.java

@Override
public void doCollectInformation(ProgressIndicator progress) {
    final List<TextRange> collectedRanges = Lists.newLinkedList();

    PsiRecursiveElementVisitor visitor = new PsiRecursiveElementVisitor() {
        @Override/*from w w  w .  j a v  a  2s  . c o m*/
        public void visitElement(PsiElement element) {
            if (element instanceof BashHereDoc) {
                collectedRanges.add(element.getTextRange());
            } else {
                element.acceptChildren(this);
            }
        }
    };

    visitor.visitElement(bashFile);
    unhighlightRanges = collectedRanges;
}

From source file:org.obm.push.impl.MappingServiceImpl.java

@Override
public List<ItemDeletion> buildItemsToDeleteFromUids(CollectionId collectionId, Collection<Long> uids) {
    List<ItemDeletion> deletions = Lists.newLinkedList();
    for (Long uid : uids) {
        deletions.add(ItemDeletion.builder().serverId(collectionId.serverId(Ints.checkedCast(uid))).build());
    }/*from  ww  w.j  a v  a2  s .c o  m*/
    return deletions;
}