Example usage for com.google.common.collect ImmutableList.Builder addAll

List of usage examples for com.google.common.collect ImmutableList.Builder addAll

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableList.Builder addAll.

Prototype

boolean addAll(Collection<? extends E> c);

Source Link

Document

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).

Usage

From source file:com.spectralogic.ds3autogen.net.generators.requestmodels.StreamRequestPayloadGenerator.java

/**
 * Gets the list of Arguments for creating the constructor, which is comprised of the
 * required parameters and the request payload stream
 *//*from   w  w  w.  ja  v a  2 s . c  o m*/
@Override
public ImmutableList<Arguments> toConstructorArgsList(final Ds3Request ds3Request) {
    final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
    builder.addAll(GeneratorUtils.getRequiredArgs(ds3Request));
    builder.add(new Arguments("Stream", "RequestPayload"));
    return builder.build();
}

From source file:gov.ca.cwds.data.legacy.cms.dao.LicenseStatusDao.java

@Override
public List<LicenseStatus> findAll() {
    Session session = this.grabSession();
    final Query<LicenseStatus> query = session.createNamedQuery(LicenseStatus.NQ_ALL, LicenseStatus.class);
    ImmutableList.Builder<LicenseStatus> entities = new ImmutableList.Builder<>();
    entities.addAll(query.list());
    return entities.build();
}

From source file:com.spectralogic.ds3autogen.net.generators.requestmodels.StringRequestPayloadGenerator.java

/**
 * Gets the list of Arguments for creating the constructor, which is comprised of the
 * required parameters and the request payload string
 *///  w  w w . j  a v  a  2  s .  c  o  m
@Override
public ImmutableList<Arguments> toConstructorArgsList(final Ds3Request ds3Request) {
    final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
    builder.addAll(GeneratorUtils.getRequiredArgs(ds3Request));
    builder.add(new Arguments("String", "RequestPayload"));
    return builder.build();
}

From source file:eu.arthepsy.sonar.plugins.scapegoat.ScapegoatPlugin.java

@Override
public List getExtensions() {
    ImmutableList.Builder<Object> builder = ImmutableList.builder();
    builder.addAll(ScapegoatConfiguration.getPropertyDefinitions());
    //builder.add(Scala.class);
    builder.add(ScapegoatRulesDefinition.class);
    builder.add(ScapegoatQualityProfile.class);
    builder.add(ScapegoatReportSensor.class);
    return builder.build();
}

From source file:com.spectralogic.ds3autogen.net.generators.requestmodels.PutObjectRequestGenerator.java

/**
 * Gets the list of Arguments for creating the constructor, which is comprised of the
 * required parameters, the request payload stream, and the length of the payload
 *///from www . ja  v  a 2s . co  m
@Override
public ImmutableList<Arguments> toConstructorArgsList(final Ds3Request ds3Request) {
    final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
    builder.addAll(GeneratorUtils.getRequiredArgs(ds3Request));
    builder.add(new Arguments("Stream", "RequestPayload"));
    builder.add(new Arguments("long", "Length"));
    return builder.build();
}

From source file:com.spectralogic.ds3autogen.net.generators.typemodels.NoneEnumGenerator.java

/**
 * Converts a list of Ds3EnumConstants into a list of Enum Constants and
 * adds the enum constant NONE/*  w  ww. j  av a 2s.  com*/
 */
@Override
public ImmutableList<EnumConstant> toEnumConstantsList(final ImmutableList<Ds3EnumConstant> ds3EnumConstants) {
    final ImmutableList.Builder<EnumConstant> builder = ImmutableList.builder();
    builder.addAll(getEnumConstantsList(ds3EnumConstants));
    builder.add(new EnumConstant("NONE"));
    return builder.build();
}

From source file:com.spectralogic.ds3autogen.java.generators.requestmodels.StringRequestPayloadGenerator.java

/**
 * Gets the list of Arguments needed to create the request constructor. This
 * includes all non-void required parameters, request header arguments, and
 * the RequestPayload/*from   ww w.j  a  v a  2  s.c o  m*/
 */
@Override
public ImmutableList<Arguments> toConstructorArgumentsList(final Ds3Request ds3Request) {
    final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
    builder.addAll(getRequiredArgsFromRequestHeader(ds3Request));
    builder.addAll(removeVoidArguments(toArgumentsList(ds3Request.getRequiredQueryParams())));
    builder.add(new Arguments("String", "RequestPayload"));
    return builder.build();
}

From source file:com.spectralogic.ds3autogen.java.generators.requestmodels.ObjectsRequestPayloadGenerator.java

/**
 * Gets the list of Arguments needed to create the request constructor. This
 * includes all non-void required parameters, and arguments described within
 * the request header. This includes a list of Ds3Objects.
 *//*  w w  w . ja  v a 2s . co m*/
@Override
public ImmutableList<Arguments> toConstructorArgumentsList(final Ds3Request ds3Request) {
    final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
    builder.addAll(getRequiredArgsFromRequestHeader(ds3Request));
    builder.addAll(removeVoidArguments(toArgumentsList(ds3Request.getRequiredQueryParams())));
    builder.add(new Arguments("List<Ds3Object>", "Objects"));
    return builder.build();
}

From source file:org.sonar.plugins.jacococd.JaCoCoCDPlugin.java

public List<?> getExtensions() {
    ImmutableList.Builder<Object> extensions = ImmutableList.builder();
    extensions.addAll(JacocoCDConfiguration.getPropertyDefinitions());
    extensions.add(JacocoCDConfiguration.class, JaCoCoCDAgentDownloader.class,
            // Ant
            JacocoCDAntInitializer.class,
            // Maven
            JacocoMavenCDInitializer.class, JaCoCoCDMavenPluginHandler.class,
            // Unit tests
            JaCoCoCDSensor.class,
            // Integration tests
            JaCoCoItCDSensor.class, JaCoCoCDOverallSensor.class);
    return extensions.build();
}

From source file:com.spectralogic.ds3autogen.java.generators.requestmodels.CompleteMultipartUploadRequestGenerator.java

/**
 * Gets the list of Arguments needed to create the request constructor. This
 * includes all non-void required parameters, and arguments described within
 * the request header. This includes a request payload of type CompleteMultipartUpload.
 *//*from   w w w  .  j  a  v a2  s. c  o m*/
@Override
public ImmutableList<Arguments> toConstructorArgumentsList(final Ds3Request ds3Request) {
    final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
    builder.addAll(getRequiredArgsFromRequestHeader(ds3Request));
    builder.addAll(removeVoidArguments(toArgumentsList(ds3Request.getRequiredQueryParams())));
    builder.add(new Arguments("CompleteMultipartUpload", "RequestPayload"));
    return builder.build();
}