generated from rnentjes/kotlin-server-web-undertow
Remove legacy JVM-specific file system, shell, and related implementations; migrate to platform-agnostic and common main modules.
This commit is contained in:
15
src/commonMain/kotlin/mtmc/emulator/RewindStep.kt
Normal file
15
src/commonMain/kotlin/mtmc/emulator/RewindStep.kt
Normal file
@@ -0,0 +1,15 @@
|
||||
package mtmc.emulator
|
||||
|
||||
import mtmc.util.Runnable
|
||||
|
||||
class RewindStep {
|
||||
var subSteps: MutableList<Runnable?> = ArrayList<Runnable?>()
|
||||
|
||||
fun rewind() {
|
||||
subSteps.reversed().forEach({ obj: Runnable? -> obj!!.invoke() })
|
||||
}
|
||||
|
||||
fun addSubStep(subStep: Runnable?) {
|
||||
subSteps.add(subStep)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user