List of usage examples for com.google.common.collect ImmutableList of
public static <E> ImmutableList<E> of(E element)
From source file:com.qubole.quark.planner.test.utilities.QuarkTestUtil.java
public static String toJson(String schema) throws JsonProcessingException { ImmutableList<String> defaultSchema = ImmutableList.of(schema); final ObjectMapper mapper = new ObjectMapper(); return mapper.writeValueAsString(defaultSchema); }
From source file:com.querydsl.core.types.template.TimeTemplate.java
public static <T extends Comparable<?>> TimeTemplate<T> create(Class<T> type, String template, Object one) { return new TimeTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one)); }
From source file:com.querydsl.core.types.template.DateTemplate.java
public static <T extends Comparable<?>> DateExpression<T> create(Class<T> type, String template, Object one) { return new DateTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one)); }
From source file:com.iadams.sonarqube.puppet.PuppetToolkit.java
public static List<Tokenizer> getPuppetTokenizers() { return ImmutableList.of( (Tokenizer) new KeywordsTokenizer("<span class=\"k\">", "</span>", PuppetKeyword.keywordValues())); }
From source file:com.yahoo.yqlplus.engine.sources.TracingSource.java
@Query public List<Person> scan() { try (Tracer trace = tracer.start("MINE", "MINE")) { trace.fine("Done scanning"); return ImmutableList.of(new Person("1", "joe", 0)); }/* w w w . j av a2 s . c o m*/ }
From source file:com.mysema.query.types.template.DateTimeTemplate.java
public static <T extends Comparable<?>> DateTimeExpression<T> create(Class<T> type, String template, Object one) {// w w w. jav a2s . c o m return new DateTimeTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one)); }
From source file:org.nkjmlab.util.slack.discussion_room.util.GoogleTranslator.java
/** * Detect the language of input text.// w w w . j a va 2s .c o m * * @param sourceText source text to be detected for language * @param out print stream */ public static void detectLanguage(String sourceText, PrintStream out) { Translate translate = createTranslateService(); List<Detection> detections = translate.detect(ImmutableList.of(sourceText)); System.out.println("Language(s) detected:"); for (Detection detection : detections) { out.printf("\t%s\n", detection); } }
From source file:com.mysema.query.types.template.ComparableTemplate.java
public static <T extends Comparable<?>> ComparableExpression<T> create(Class<T> type, String template, Object one) {//from w w w . ja va 2 s.c om return new ComparableTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one)); }
From source file:com.querydsl.core.types.template.NumberTemplate.java
public static <T extends Number & Comparable<?>> NumberExpression<T> create(Class<T> type, String template, Object one) {//from ww w.j a va 2 s. c o m return new NumberTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one)); }
From source file:google.registry.util.SendEmailUtils.java
/** * Sends an email from Nomulus to the specified recipient. Returns true iff sending was * successful./*from www . j a v a 2s. co m*/ */ public static boolean sendEmail(String address, String subject, String body) { return sendEmail(ImmutableList.of(address), subject, body); }