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

com.skillw.pouvoir.api.feature.operation.OperationElement.kt Maven / Gradle / Ivy

There is a newer version: 1.6.7-beta-6
Show newest version
package com.skillw.pouvoir.api.feature.operation

/**
 * @className OperationElement
 *
 * @author Glom
 * @date 2022/7/19 12:37 Copyright 2022 user.
 */
data class OperationElement(val numberOperation: NumberOperation, val number: Number) {
    /**
     * 做运算
     *
     * @param other 其他数字
     * @return 运算结果
     */
    fun operate(other: Number): Number {
        return numberOperation.operate(other, number)
    }

    override fun toString(): String {
        return "Operation { ${numberOperation.key} $number }"
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy