Class Unit


  • public final class Unit
    extends java.lang.Object
    The empty return type. Unlike Void, this type is actually inhabited by a singleton instance that can be used, rather than having to resort to null.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Unit UNIT
      The singleton instance.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Unit()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • UNIT

        public static final Unit UNIT
        The singleton instance.
    • Constructor Detail

      • Unit

        private Unit()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object