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

io.github.binaryfoo.Decoder.kt Maven / Gradle / Ivy

There is a newer version: 0.1.8
Show newest version
package io.github.binaryfoo

import io.github.binaryfoo.decoders.DecodeSession

/**
 * Idea being children are shown in a tree structure.
 */
interface Decoder {

    /**
     * Turn bits into something more mind friendly.
     */
    fun decode(input: String, startIndexInBytes: Int, session: DecodeSession): List

    /**
     * Return null if ok. Otherwise an abusive/informative/educational message.
     */
    fun validate(input: String?): String?

    /**
     * In characters.
     */
    fun getMaxLength(): Int
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy