/** * Converts a Java List to Scala Seq. * * @param list the java list. * @return the converted Seq. * @param <T> the element type. */ public static <T> scala.collection.Seq<T> toSeq(java.util.List<T> list) { return scala.collection.JavaConverters.asScalaBufferConverter(list).asScala(); }
/** * Converts a Java List to Scala Seq. * * @param list the java list. * @return the converted Seq. * @param <T> the element type. */ public static <T> scala.collection.Seq<T> toSeq(java.util.List<T> list) { return scala.collection.JavaConverters.asScalaBufferConverter(list).asScala(); }
/** * Converts a Java List to Scala Seq. * * @param list the java list. * @return the converted Seq. * @param <T> the element type. */ public static <T> scala.collection.Seq<T> toSeq(java.util.List<T> list) { return scala.collection.JavaConverters.asScalaBufferConverter(list).asScala(); }
/** * Converts the varargs to a scala buffer, * takes care of wrapping varargs into a intermediate list if necessary * * @param args the message arguments * @return scala type for message processing */ private static Buffer<Object> convertArgsToScalaBuffer(final Object... args) { return scala.collection.JavaConverters.asScalaBufferConverter(wrapArgsToListIfNeeded(args)).asScala(); }
/** * Converts a Java List to Scala Seq. */ public static <T> scala.collection.Seq<T> toSeq(java.util.List<T> list) { return scala.collection.JavaConverters.asScalaBufferConverter(list).asScala().toList(); }
/** * Converts the varargs to a scala buffer, * takes care of wrapping varargs into a intermediate list if necessary * * @param args the message arguments * @return scala type for message processing */ private static Buffer<Object> convertArgsToScalaBuffer(final Object... args) { return scala.collection.JavaConverters.asScalaBufferConverter(wrapArgsToListIfNeeded(args)).asScala(); }
/** * Converts the varargs to a scala buffer, * takes care of wrapping varargs into a intermediate list if necessary * * @param args the message arguments * @return scala type for message processing */ private static Seq<Object> convertArgsToScalaBuffer(final Object... args) { return scala.collection.JavaConverters.asScalaBufferConverter(wrapArgsToListIfNeeded(args)).asScala().toList(); }
/** * Converts the varargs to a scala buffer, * takes care of wrapping varargs into a intermediate list if necessary * * @param args the message arguments * @return scala type for message processing */ private static Seq<Object> convertArgsToScalaBuffer(final Object... args) { return scala.collection.JavaConverters.asScalaBufferConverter(wrapArgsToListIfNeeded(args)).asScala().toList(); }
/** * Converts the varargs to a scala buffer, * takes care of wrapping varargs into a intermediate list if necessary * * @param args the message arguments * @return scala type for message processing */ private static Seq<Object> convertArgsToScalaBuffer(final Object... args) { return scala.collection.JavaConverters.asScalaBufferConverter(wrapArgsToListIfNeeded(args)).asScala().toList(); }
/** * Translates the first defined message. * * Uses `java.text.MessageFormat` internally to format the message. * * @param lang the message lang * @param keys the messages keys * @param args the message arguments * @return the formatted message or a default rendering if the key wasn't defined */ public String get(play.api.i18n.Lang lang, List<String> keys, Object... args) { Buffer<String> keyArgs = scala.collection.JavaConverters.asScalaBufferConverter(keys).asScala(); Buffer<Object> scalaArgs = convertArgsToScalaBuffer(args); return messages.apply(keyArgs.toSeq(), scalaArgs, lang); }
/** * Translates the first defined message. * * Uses `java.text.MessageFormat` internally to format the message. * * @param lang the message lang * @param keys the messages keys * @param args the message arguments * @return the formatted message or a default rendering if the key wasn't defined */ public String get(play.api.i18n.Lang lang, List<String> keys, Object... args) { Buffer<String> keyArgs = scala.collection.JavaConverters.asScalaBufferConverter(keys).asScala(); Seq<Object> scalaArgs = convertArgsToScalaBuffer(args); return messages.apply(keyArgs.toSeq(), scalaArgs, lang); }
/** * Translates the first defined message. * * Uses `java.text.MessageFormat` internally to format the message. * * @param lang the message lang * @param keys the messages keys * @param args the message arguments * @return the formatted message or a default rendering if the key wasn't defined */ public String get(play.api.i18n.Lang lang, List<String> keys, Object... args) { Buffer<String> keyArgs = scala.collection.JavaConverters.asScalaBufferConverter(keys).asScala(); Seq<Object> scalaArgs = convertArgsToScalaBuffer(args); return messages.apply(keyArgs.toSeq(), scalaArgs, lang); }
/** * Translates the first defined message. * * Uses `java.text.MessageFormat` internally to format the message. * * @param lang the message lang * @param keys the messages keys * @param args the message arguments * @return the formatted message or a default rendering if the key wasn't defined */ public String get(play.api.i18n.Lang lang, List<String> keys, Object... args) { Buffer<String> keyArgs = scala.collection.JavaConverters.asScalaBufferConverter(keys).asScala(); Seq<Object> scalaArgs = convertArgsToScalaBuffer(args); return messages.apply(keyArgs.toSeq(), scalaArgs, lang); }
/** * Converts a Java List to Scala Seq. */ public static <T> scala.collection.Seq<T> toSeq(java.util.List<T> list) { return scala.collection.JavaConverters.asScalaBufferConverter(list).asScala().toList(); }
/** * Detokenize the input list of words. * * @param tokens List of words. * @return Detokenized string. */ public static String detokenize(List<String> tokens) { return OpenKoreanTextProcessor.detokenize(JavaConverters.asScalaBufferConverter(tokens).asScala()); }
/** * Add user-defined words to the noun dictionary. Spaced words are ignored. * * @param words List of user nouns. */ public static void addNounsToDictionary(List<String> words) { OpenKoreanTextProcessor.addNounsToDictionary(JavaConverters.asScalaBufferConverter(words).asScala()); }
@Override public scala.collection.immutable.List<Class<?>> classesFromContext( Application app, ServletConfig sc) { List<Class<?>> classes = Lists.newArrayList(); addJaxrsClasses(injector, classes); return JavaConverters.asScalaBufferConverter(classes).asScala().toList(); }
@Override public scala.collection.immutable.List<Class<?>> classesFromContext( Application app, ServletConfig sc) { List<Class<?>> classes = Lists.newArrayList(); addJaxrsClasses(injector, classes); return JavaConverters.asScalaBufferConverter(classes).asScala().toList(); }
/** * Remove user-defined word List from the dictionary for the specified KoreanPos. * * @param pos KoreanPos of words to add. * @param words Sequence of words to add. */ public static void removeWordFromDictionary(KoreanPosJava pos, List<String> words) { OpenKoreanTextProcessor.removeWordsFromDictionary(KoreanPos.withName(pos.toString()), JavaConverters.asScalaBufferConverter(words).asScala()); }
/** * Add user-defined word List to the dictionary for the specified KoreanPos. * * @param pos KoreanPos of words to add. * @param words Sequence of words to add. */ public static void addWordsToDictionary(KoreanPosJava pos, List<String> words) { OpenKoreanTextProcessor.addWordsToDictionary(KoreanPos.withName(pos.toString()), JavaConverters.asScalaBufferConverter(words).asScala()); }