![JAR search and dependency download from the Maven repository](/logo.png)
General.uuid.scala Maven / Gradle / Ivy
/* Title: Pure/General/uuid.scala
Author: Makarius
Universally unique identifiers.
*/
package isabelle
object UUID
{
type T = java.util.UUID
def random(): T = java.util.UUID.randomUUID()
def random_string(): String = random().toString
def unapply(s: String): Option[T] =
try { Some(java.util.UUID.fromString(s)) }
catch { case _: IllegalArgumentException => None }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy