Minor: add toString methods to progress tracker objects

This commit is contained in:
Mike Hearn 2016-03-23 16:47:55 +00:00
parent 5b7fb86b6b
commit e21f61ff10

View File

@ -42,9 +42,15 @@ import java.util.*
*/
class ProgressTracker(vararg steps: Step) {
sealed class Change {
class Position(val newStep: Step) : Change()
class Rendering(val ofStep: Step) : Change()
class Structural(val parent: Step) : Change()
class Position(val newStep: Step) : Change() {
override fun toString() = newStep.label
}
class Rendering(val ofStep: Step) : Change() {
override fun toString() = ofStep.label
}
class Structural(val parent: Step) : Change() {
override fun toString() = "Structural step change in child of ${parent.label}"
}
}
/** The superclass of all step objects. */