All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.specs2.reflect.Generation.scala Maven / Gradle / Ivy

The newest version!
package org.specs2
package reflect

private[specs2]
object Generation {
  def typeParameters(n: Int) = (1 to n).map(j => "T"+j).mkString("[", ",", ",R]")
  def parametersAndTypes(n: Int) = (1 to n).map(j => "t"+j+":T"+j).mkString(",")
  def tupleTypes(n: Int) = (1 to n).map(j => "T"+j).mkString("(", ",", ")")
  def parameters(n: Int) = (1 to n).map(j => "t"+j).mkString(",")
  def function(n: Int) = "Function"+n+(1 to n).map(j => "T"+j).mkString("[", ",", ",R]")
  def values(n: Int) = (1 to n).map(j => "values._1._"+j).mkString("(", ",", ", values._2)")
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy