Example usage for com.google.common.collect Iterables concat

List of usage examples for com.google.common.collect Iterables concat

Introduction

In this page you can find the example usage for com.google.common.collect Iterables concat.

Prototype

public static <T> Iterable<T> concat(Iterable<? extends T> a, Iterable<? extends T> b,
        Iterable<? extends T> c) 

Source Link

Document

Combines three iterables into a single iterable.

Usage

From source file:org.eclipse.elk.force.graph.FGraph.java

/**
 * Returns a list of all particles occurring in the graph: vertices, labels, and bend points.
 * /*from   w w w  . j  a v a2s .co  m*/
 * @return iterable over all particles
 */
public Iterable<FParticle> getParticles() {
    return Iterables.concat(nodes, labels, bendPoints);
}

From source file:de.tuberlin.uebb.jdae.examples.BouncingBallArray.java

@Override
public Collection<ContinuousEvent> events(Map<Unknown, GlobalVariable> ctxt) {
    return ImmutableList
            .copyOf(Iterables.concat(balls[0].events(ctxt), balls[1].events(ctxt), balls[2].events(ctxt)));
}

From source file:org.s23m.cell.communication.xml.model.schemainstance.ArtifactSet.java

@Override
public Iterable<? extends Node> getChildren() {
    return Iterables.concat(ImmutableList.of(language), modelList, semanticDomainList);
}

From source file:org.gradle.execution.plan.TaskNode.java

@Override
public Iterable<Node> getAllSuccessors() {
    return Iterables.concat(getMustSuccessors(), getFinalizingSuccessors(), super.getAllSuccessors());
}

From source file:org.sonar.java.ast.parser.TypeParameterListTreeImpl.java

@Override
public Iterable<Tree> children() {
    return Iterables.concat(Collections.singletonList(openBracketToken), super.children(),
            Collections.singletonList(closeBracketToken));
}

From source file:org.sonar.java.model.statement.BlockTreeImpl.java

@Override
public Iterable<Tree> children() {
    return Iterables.concat(Collections.singletonList(openBraceToken), body,
            Collections.singletonList(closeBraceToken));
}

From source file:org.apache.brooklyn.rest.BrooklynRestApi.java

public static Iterable<Object> getAllResources() {
    return Iterables.concat(getBrooklynRestResources(), getApidocResources(), getMiscResources());
}

From source file:org.datacleaner.descriptors.AbstractDescriptorProvider.java

@Override
public ComponentDescriptor<?> getComponentDescriptorByDisplayName(final String name) {
    final Iterable<ComponentDescriptor<?>> allComponentDescriptors = Iterables.concat(getAnalyzerDescriptors(),
            getTransformerDescriptors(), getFilterDescriptors());
    ComponentDescriptor<?> match = getComponentDescriptorByDisplayName(name, allComponentDescriptors, true,
            false);/* ww  w  . j  ava 2 s . c  o  m*/
    if (match == null) {
        match = getComponentDescriptorByDisplayName(name, allComponentDescriptors, false, true);
    }
    return match;
}

From source file:com.github.fhirschmann.clozegen.lib.util.CollectionUtils.java

/**
 * Returns a view of a list made up of the n adjacent neighbors of an element
 * and the element itself.// www .j  a  va  2  s . c om
 *
 * If the element does not have any neighbors, null will be inserted.
 *
 * @param <T> the type of the list elements
 * @param list the list to use
 * @param index the index of the element to get the adjacent neighbors for
 * @param num the number of neighbors (on each side) to include
 * @return a view based on the specified parameters
 */
public static <T> List<T> getNullPaddedAdjacentTo(final List<T> list, final int index, final int num) {
    final List<T> paddingNulls = Lists.newArrayList();
    for (int i = 0; i < num; i++) {
        paddingNulls.add(null);
    }
    return getAdjacentTo(Lists.newArrayList(Iterables.concat(paddingNulls, list, paddingNulls)), index + num,
            num);
}

From source file:org.sonar.java.ast.parser.ArgumentListTreeImpl.java

@Override
public Iterable<Tree> children() {
    return Iterables.concat(
            openParenToken != null ? Collections.singletonList(openParenToken) : Collections.<Tree>emptyList(),
            super.children(), closeParenToken != null ? Collections.singletonList(closeParenToken)
                    : Collections.<Tree>emptyList());
}