List of usage examples for com.google.common.collect ImmutableList of
public static <E> ImmutableList<E> of(E element)
From source file:io.druid.sql.calcite.filtration.RangeSets.java
public static <T extends Comparable<T>> RangeSet<T> of(final Range<T> range) { return unionRanges(ImmutableList.of(range)); }
From source file:io.prestosql.metadata.SqlAggregationFunction.java
public static List<SqlAggregationFunction> createFunctionByAnnotations(Class<?> aggregationDefinition) { return ImmutableList.of(AggregationFromAnnotationsParser.parseFunctionDefinition(aggregationDefinition)); }
From source file:org.sonar.cxx.toolkit.CxxToolkit.java
public static List<Tokenizer> getCxxTokenizers() { return ImmutableList .of((Tokenizer) new KeywordsTokenizer("<span class=\"k\">", "</span>", CxxKeyword.keywordValues())); }
From source file:io.sidecar.ModelTestUtils.java
public static Event createSampleEvent() { Reading reading = new Reading("ABC", DateTime.now(DateTimeZone.UTC), 42); return new Event.Builder().id(UUID.randomUUID()).deviceId(UUID.randomUUID().toString()) .timestamp(DateTime.now(DateTimeZone.UTC)).stream("wowza").tags(ImmutableSet.<String>of()) .location(new Location(47.6014, -122.33)).readings(ImmutableList.of(reading)) .keytags(ImmutableList.of(new KeyTag("key", Sets.newHashSet("keytag")))).build(); }
From source file:org.janusgraph.graphdb.util.ElementHelper.java
public static Iterable<Object> getValues(JanusGraphElement element, PropertyKey key) { if (element instanceof JanusGraphRelation) { Object value = element.valueOrNull(key); if (value == null) return Collections.EMPTY_LIST; else/*from w w w . j ava 2 s. c o m*/ return ImmutableList.of(value); } else { assert element instanceof JanusGraphVertex; return Iterables.transform((((JanusGraphVertex) element).query()).keys(key.name()).properties(), new Function<JanusGraphVertexProperty, Object>() { @Nullable @Override public Object apply(@Nullable JanusGraphVertexProperty janusgraphProperty) { return janusgraphProperty.value(); } }); } }
From source file:org.opensingular.form.document.SDocumentConsumer.java
/** Criar um novo setuper contendo o passo informado. */ @Nonnull/*w ww . j a va 2 s.c o m*/ public static SDocumentConsumer of(@Nonnull IConsumer<SDocument> setupStep) { Objects.requireNonNull(setupStep); return new SDocumentConsumer(ImmutableList.of(setupStep)); }
From source file:com.yahoo.yqlplus.engine.sources.KeyedSource.java
@Query public List<IntegerKeyed> lookup(@Key("woeid") Integer integer) { return ImmutableList.of(new IntegerKeyed(integer)); }
From source file:org.apache.druid.indexing.common.TaskRealtimeMetricsMonitorBuilder.java
public static RealtimeMetricsMonitor build(Task task, FireDepartment fireDepartment) { return new RealtimeMetricsMonitor(ImmutableList.of(fireDepartment), ImmutableMap.of(DruidMetrics.TASK_ID, new String[] { task.getId() }, DruidMetrics.TASK_TYPE, new String[] { task.getType() })); }
From source file:com.opengamma.language.view.GetViewPortfolioFunction.java
private static List<MetaParameter> parameters() { final MetaParameter viewDefinitionId = new MetaParameter("id", JavaTypeInfo.builder(UniqueId.class).get()); return ImmutableList.of(viewDefinitionId); }
From source file:com.google.javascript.jscomp.GoldenFileComparer.java
private static ImmutableList<SourceFile> coverageExterns() { SourceFile externs = SourceFile.fromCode("externs", "function Symbol() {}; var window; var self;"); return ImmutableList.of(externs); }