From bbcf83e23959ce39ea425d54b80460cfabefa357 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 19 Nov 2022 16:06:22 +0700 Subject: [PATCH] Java friendly version of hasMatterValue --- src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt index 8a66a147e..e20876ee2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt @@ -11,6 +11,11 @@ interface IMatterValue : Comparable { val hasMatterValue: Boolean get() = matter.isPositive && complexity > 0.0 + /** + * Java friendly version of hasMatterValue + */ + fun hasMatterValue() = hasMatterValue + operator fun plus(other: IMatterValue): IMatterValue { return MatterValue(matter + other.matter, complexity + other.complexity) }