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

net.scalax.simple.adt.IsFinishAndNothing.scala Maven / Gradle / Ivy

The newest version!
package net.scalax.simple.adt

import scala.annotation.meta.param

final class IsFinishAndNothing(@(transient @param) obj: Any) {
  def default[T](t: => T): T               = t
  def isEnded: IsFinishAndNothing          = this
  def matchErrorAndThrowException: Nothing = throw new MatchError(obj)
}
object IsFinishAndNothing {
  def value(obj: Any): IsFinishAndNothing = new IsFinishAndNothing(obj)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy