List of usage examples for com.google.common.collect Lists asList
public static <E> List<E> asList(@Nullable E first, E[] rest)
From source file:org.fao.geonet.api.FieldNameExclusionStrategy.java
public FieldNameExclusionStrategy(String... fieldNames) { excludedFields = Lists.asList("", fieldNames); }
From source file:org.elasticsearch.util.logging.Loggers.java
public static Logger getLogger(Class clazz, Settings settings, Index index, String... prefixes) { return getLogger(clazz, settings, Lists.asList(index.name(), prefixes).toArray(new String[0])); }
From source file:net.caseif.unusuals.UnusualEffect.java
public UnusualEffect(String name, ParticleEffect particle) { this(name, Lists.asList(particle, new ParticleEffect[1])); }
From source file:com.google.caliper.runner.JarFinder.java
/** * Returns a list of jar files reachable from the given class loaders. * * <p>Currently only {@link URLClassLoader} and only {@code file://} urls are supported. * * @throws IOException if the attempt to read class path resources (jar files or directories) * failed.// ww w . j a v a 2s. co m */ public static ImmutableSet<File> findJarFiles(ClassLoader first, ClassLoader... rest) throws IOException { Scanner scanner = new Scanner(); Map<URI, ClassLoader> map = Maps.newLinkedHashMap(); for (ClassLoader classLoader : Lists.asList(first, rest)) { map.putAll(getClassPathEntries(classLoader)); } for (Map.Entry<URI, ClassLoader> entry : map.entrySet()) { scanner.scan(entry.getKey(), entry.getValue()); } return scanner.jarFiles(); }
From source file:org.athrun.android.framework.agent.common.AdbUtils.java
public static Process runCommand(String... arguments) { List<String> commandLine = Lists.asList(getAdbPath(getSdkPath()), arguments); ProcessBuilder processBuilder = new ProcessBuilder(commandLine); try {//from w ww . j a va 2s . co m return processBuilder.start(); } catch (IOException e) { throw new RuntimeException("An IOException occurred when starting ADB.", e); } }
From source file:edu.brandeis.cs.develops.eptosql.ir_generator.IRGenerator.java
public synchronized List<Relation> decompose(Relation r) throws IRGenerationException { if (r instanceof Table) { return Lists.asList(r, new Relation[] {}); }/*from w w w . ja v a 2 s.c o m*/ tempCounter = new AtomicInteger(0); emit = new LinkedList<Relation>(); decomposeSubtree(r); List<Relation> toR = emit; emit = null; tempCounter = null; return toR; }
From source file:com.thinkbiganalytics.metadata.rest.model.data.HiveTablePartition.java
public HiveTablePartition(String name, String formula, String value, String... more) { super();/*from w w w. j av a 2 s .c o m*/ this.name = name; this.formula = formula; this.values = Lists.asList(value, more); }
From source file:co.cask.cdap.api.dataset.lib.AbstractDataset.java
public AbstractDataset(String instanceName, Dataset embedded, Dataset... otherEmbedded) { this.instanceName = instanceName; this.underlying = Lists.asList(embedded, otherEmbedded); ImmutableList.Builder<TransactionAware> builder = ImmutableList.builder(); for (Dataset dataset : underlying) { if (dataset instanceof TransactionAware) { builder.add((TransactionAware) dataset); }/*from www. j a va 2 s . c om*/ } this.txAwares = TransactionAwares.of(builder.build()); }
From source file:mx.bigdata.sat.cfdi.TFDv1_v32.java
private static final JAXBContext createContext() { try {//from www . j av a 2s .c om List<String> ctx = Lists.asList("mx.bigdata.sat.cfdi.schema.v32", new String[] { "mx.bigdata.sat.complementos.schema.nomina", "mx.bigdata.sat.complementos.schema.implocal" }); //return JAXBContext.newInstance("mx.bigdata.sat.cfdi.schema.v32"); return JAXBContext.newInstance(JOINER.join(ctx)); } catch (Exception e) { throw new Error(e); } }
From source file:org.sonar.api.utils.UriReader.java
public UriReader(SchemeProcessor[] processors) { List<SchemeProcessor> allProcessors = Lists.asList(new FileProcessor(), processors); for (SchemeProcessor processor : allProcessors) { for (String scheme : processor.getSupportedSchemes()) { processorsByScheme.put(scheme.toLowerCase(Locale.ENGLISH), processor); }/*from w w w . j a va2s . c om*/ } }