嗨伙计们,我有元组对的列表,List[(String,String)]并希望将其展平为字符串列表,List[String]
任何帮助赞赏.
我试图使用"应该"功能以及逻辑"OR"运算符,如下所示(例如):
def String(x :Integer) :Integer ={
/*----------------
-----------------*/
return value;
}
String.value.size should be (8) || String.value.size should be (0) /*that is anything other than the value 8 or 0 should cause a false and the program should start execution */
Run Code Online (Sandbox Code Playgroud)
但我得到一个错误,说"值||不是org.scalatest.matchers.Matcher [Any]的成员"
有人可以帮我吗 先感谢您..