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

com.github.insanusmokrassar.iobjectk.interfaces.IInputObject.kt Maven / Gradle / Ivy

package com.github.insanusmokrassar.iobjectk.interfaces

import com.github.insanusmokrassar.iobjectk.exceptions.ReadException

interface IInputObject {

    /**
     * @param key Key for getting data
     * @return Object or null
     */
    @Throws(ReadException::class)
    fun get(key : KeyType) : T

    /**
     * @return Set of the keys. Can't be null but can be empty
     */
    fun keys() : Set
}

fun  IInputObject.has(key: K): Boolean {
    return keys().contains(key)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy