Class Unit


  • public final class Unit
    extends java.lang.Object
    Represents a unit type.

    A unit type has only one possible value. It is semantically equivalent to Void, but can be instantiated.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Unit get()
      Gets the singleton Unit value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public static Unit get()
        Gets the singleton Unit value.
        Returns:
        Singleton Unit value.