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:com.pradeep.blackjack.hand.Hand.java

public Hand() {
    cards = Lists.newLinkedList();
}

From source file:com.google.jstestdriver.RelativePathConverter.java

public List<FileInfo> convert() {
    List<FileInfo> convertedPaths = Lists.newLinkedList();

    for (FileInfo f : files) {
        convertedPaths.add(new FileInfo(f.getFilePath().replace(baseDir, ""), f.getTimestamp(), -1, f.isPatch(),
                f.isServeOnly(), f.getData(), f.getDisplayPath()));
    }//from   w  w w. j  a  v  a 2  s  .com
    return convertedPaths;
}

From source file:org.locationtech.geogig.storage.memory.PathToRootWalker.java

public PathToRootWalker(Node start) {
    q = Lists.newLinkedList();
    q.add(start);

    seen = Sets.newHashSet();
}

From source file:com.greplin.lucene.search.AllMatchCollector.java

/**
 * Creates a new all match collector.
 */
public AllMatchCollector() {
    docs = Lists.newLinkedList();
}

From source file:org.eclipse.xtext.xbase.scoping.batch.FeatureScopeSessionWithNestedTypes.java

public FeatureScopeSessionWithNestedTypes(AbstractFeatureScopeSession parent, JvmDeclaredType type) {
    super(parent);
    this.enclosingTypes = Lists.newLinkedList();
    enclosingTypes.add(type);//from   w w w .  ja va2  s .  c  o  m
    enclosingTypes.addAll(parent.getEnclosingTypes());
    this.nestedTypeDeclarators = Lists.newLinkedList();
    nestedTypeDeclarators.add(type);
    nestedTypeDeclarators.addAll(parent.getNestedTypeDeclarators());
}

From source file:org.apache.aurora.common.net.http.handlers.ThreadStackPrinter.java

@GET
@Produces(MediaType.TEXT_PLAIN)/*from   w  ww . j a v  a2s  .c  om*/
public String getThreadStacks() {
    List<String> lines = Lists.newLinkedList();
    for (Map.Entry<Thread, StackTraceElement[]> entry : Thread.getAllStackTraces().entrySet()) {
        Thread t = entry.getKey();
        lines.add(String.format("Name: %s\nState: %s\nDaemon: %s\nID: %d", t.getName(), t.getState(),
                t.isDaemon(), t.getId()));
        for (StackTraceElement s : entry.getValue()) {
            lines.add("    " + s.toString());
        }
    }
    return Joiner.on("\n").join(lines);
}

From source file:jada.ngeditor.model.elements.effects.GEffect.java

public void createEffectFor(Element ownerElement, EffectEventId eventID) {
    effectType.materialize(ownerElement.getNifty(), ownerElement, eventID, new Attributes(),
            Lists.newLinkedList());
}

From source file:com.jeroensteenbeeke.andalite.xml.XMLRecipeBuilder.java

public XMLRecipeBuilder() {
    this.steps = Lists.newLinkedList();
}

From source file:com.torodb.torod.core.language.querycriteria.utils.EqualFactory.java

public static QueryCriteria createEquality(AttributeReference attRef, KVValue<?> docValue) {
    EqualityQueryFinder eqf = new EqualityQueryFinder(attRef);

    LinkedList<AttributeReference.Key> keys = Lists.newLinkedList();

    docValue.accept(eqf, keys);// ww  w  . jav a 2s.com

    return eqf.getConjunctionBuilder().build();
}

From source file:org.polarsys.reqcycle.utils.iterators.pickers.ArcPicker.java

public Iterable<?> getNexts(Object element) throws PickerExecutionException {
    List<IArc> result = Lists.newLinkedList();
    if (element instanceof IArc) {
        IArc arc = (IArc) element;/*from ww w  .  j a v a2s.c  o m*/
        // Getting the destination of the arc : the nexts are
        // the arcs starting from the destination.
        Object destination = arc.getDestination();
        Iterable<?> nexts = basicPicker.getNexts(destination);
        if (nexts != null) {
            for (Object child : nexts) {
                IArc arcChild = new PickableArc(basicPicker, arc, destination, child);
                result.add(arcChild);
            }
        }
    }
    return result;
}