
okreplay.TapeMode.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of okreplay Show documentation
Show all versions of okreplay Show documentation
Core module for OkReplay library
The newest version!
package okreplay
enum class TapeMode(val isReadable: Boolean, val isWritable: Boolean, val isSequential: Boolean) {
UNDEFINED(false, false, false), READ_WRITE(true, true, false), READ_ONLY(true, false, false),
READ_ONLY_QUIET(true, false, false), READ_SEQUENTIAL(true, false, true), WRITE_ONLY(false,
true, false), WRITE_SEQUENTIAL(false, true, true);
/**
* For compatibility with Groovy truth.
*/
fun asBoolean(): Boolean {
return isReadable || isWritable
}
fun toNullable(): TapeMode? {
return if (this == UNDEFINED) null else this
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy