object CABRunLengthEncoder
- Alphabetic
- By Inheritance
- CABRunLengthEncoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type RunLength[A] = IndexedReaderWriterStateT[RunLengthConfig, Cord, RunLengthState, RunLengthState, Free.Trampoline, A]
- case class RunLengthConfig(minRun: Int) extends Product with Serializable
the configuration of our encoder, this will be used in the Reader part of our RWST
- case class RunLengthState(lastToken: Option[Token], length: Int, input: List[Token]) extends Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def done: RunLength[Boolean]
have we exhausted the input?
- def emit: RunLength[Unit]
emit the lastToken
- def encode(minRun: Int, input: List[Token]): String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def maybeEmit: RunLength[Unit]
emit tokens if the next input token is different than the last
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val readToken: RunLength[Token]
read a token from the input
- val readToken2: RunLength[Token]
with the above syntax imported, we can perform the same computation as above, but use a for comprehension
- val rle: MonadReader[[ε$6$]IndexedReaderWriterStateT[RunLengthConfig, Cord, RunLengthState, RunLengthState, Free.Trampoline, ε$6$], RunLengthConfig] with MonadState[[ε$7$]IndexedReaderWriterStateT[RunLengthConfig, Cord, RunLengthState, RunLengthState, Free.Trampoline, ε$7$], RunLengthState] with MonadListen[[ε$8$]IndexedReaderWriterStateT[RunLengthConfig, Cord, RunLengthState, RunLengthState, Free.Trampoline, ε$8$], Cord]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def writeOutput(token: Token, length: Int, minRun: Int): RunLength[Unit]
put output on the writer
- object RunLengthState extends Serializable