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

scala.build.preprocessing.Scoped.scala Maven / Gradle / Ivy

package scala.build.preprocessing

final case class Scoped[T](path: ScopePath, value: T) {
  def appliesTo(candidate: ScopePath): Boolean =
    path.root == candidate.root &&
    candidate.path.startsWith(path.path)
  def valueFor(candidate: ScopePath): Option[T] =
    if (appliesTo(candidate)) Some(value) else None
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy