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

de.sciss.lucre.stm.IDPeek.scala Maven / Gradle / Ivy

package de.sciss.lucre.stm

import de.sciss.lucre.confluent

// XXX TODO - perhaps this should become public API?
object IDPeek {
  def apply[S <: Sys[S]](id: S#ID): Int = id match {
    case x: InMemoryLike .ID[_] => x.id
    case x: DurableLike  .ID[_] => x.id
    case x: confluent.Identifier[_] => x.base
    case _ => sys.error(s"Unsupported identifier $id")
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy