Break compiler dependency from 'collection' project.

This commit is contained in:
Eugene Vigdorchik 2012-07-10 20:51:34 +04:00 committed by Mark Harrah
parent e9ed0feb87
commit 35cfba21c0
3 changed files with 1 additions and 8 deletions

View File

@ -20,13 +20,6 @@ object Util
case Left(l) => (l +: acc._1, acc._2)
case Right(r) => (acc._1, r +: acc._2)
}
def counted(prefix: String, single: String, plural: String, count: Int): Option[String] =
count match
{
case 0 => None
case 1 => Some("1 " + prefix + single)
case x => Some(x.toString + " " + prefix + plural)
}
def pairID[A,B] = (a: A, b: B) => (a,b)
}

View File

@ -119,4 +119,4 @@ private final class MRelation[A,B](fwd: Map[A, Set[B]], rev: Map[B, Set[A]]) ext
def contains(a: A, b: B): Boolean = forward(a)(b)
override def toString = all.map { case (a,b) => a + " -> " + b }.mkString("Relation [", ", ", "]")
}
}