replace unicode arrows

* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
This commit is contained in:
Patrik Nordwall 2019-02-09 15:25:39 +01:00
parent e4d38f92a4
commit 5c96a5f556
1521 changed files with 18846 additions and 18786 deletions

View file

@ -139,9 +139,9 @@ abstract class JavaPartialFunction[A, B] extends AbstractPartialFunction[A, B] {
@throws(classOf[Exception])
def apply(x: A, isCheck: Boolean): B
final def isDefinedAt(x: A): Boolean = try { apply(x, true); true } catch { case NoMatch false }
final override def apply(x: A): B = try apply(x, false) catch { case NoMatch throw new MatchError(x) }
final override def applyOrElse[A1 <: A, B1 >: B](x: A1, default: A1 B1): B1 = try apply(x, false) catch { case NoMatch default(x) }
final def isDefinedAt(x: A): Boolean = try { apply(x, true); true } catch { case NoMatch => false }
final override def apply(x: A): B = try apply(x, false) catch { case NoMatch => throw new MatchError(x) }
final override def applyOrElse[A1 <: A, B1 >: B](x: A1, default: A1 => B1): B1 = try apply(x, false) catch { case NoMatch => default(x) }
}
/**
@ -183,8 +183,8 @@ object Option {
* Converts a Scala Option to a Java Option
*/
def fromScalaOption[T](scalaOption: scala.Option[T]): Option[T] = scalaOption match {
case scala.Some(r) some(r)
case scala.None none
case scala.Some(r) => some(r)
case scala.None => none
}
/**
@ -238,8 +238,8 @@ object Util {
*/
def immutableSeq[T](iterable: java.lang.Iterable[T]): immutable.Seq[T] =
iterable match {
case imm: immutable.Seq[_] imm.asInstanceOf[immutable.Seq[T]]
case other
case imm: immutable.Seq[_] => imm.asInstanceOf[immutable.Seq[T]]
case other =>
val i = other.iterator()
if (i.hasNext) {
val builder = new immutable.VectorBuilder[T]