<commit_before>package mytest.casematch

object OptionDemo {
  def main(args: Array[String]) {
    val map = Map("a" -> 1, "b" -> 2)

    val v = map.get("b") match {
      case Some(i) => i
      case None => 0<commit_msg>匹配则封装到Some对象当中<commit_after>package mytest.casematch

/**
  * option对象
  */
object OptionDemo {
  def main(args: Array[String]) {
    val map = Map("a" -> 1, "b" -> 2)

    val v = map.get("b") match {
      case Some(i) => i //匹配则封装到Some对象当中
      case None => 0 //否则None对象
{'fraction_non_alphanumeric': 0.16498993963782696, 'fraction_numerical': 0.012072434607645875, 'mean_word_length': 2.688888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '351415', 'n_tokens_mistral': 208, 'n_tokens_neox': 207, 'n_words': 48}