Package org.swisspush.gateleen.core.util
Class Unit
- java.lang.Object
-
- org.swisspush.gateleen.core.util.Unit
-
public final class Unit extends Object
The type with only one value: the Unit object. Used whenVoidcannot be used (for example needs a non-null value).Is immutable, supports equals/hashcode (since it's a singleton reference equality).
Same in rust: https://doc.rust-lang.org/nightly/std/primitive.unit.html
Same in kotlin: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html
-
-
Method Detail
-
get
public static Unit get()
-
-