Class Unit

  • All Implemented Interfaces:
    java.lang.Comparable<Unit>

    public class Unit
    extends java.lang.Object
    implements java.lang.Comparable<Unit>
    Synthetic record with zero fields.

    Since all instances are identical, Unit is a singleton.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Unit INSTANCE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Unit()  
    • Method Summary

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

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

      • INSTANCE

        public static final Unit INSTANCE
    • Constructor Detail

      • Unit

        private Unit()
    • Method Detail

      • compareTo

        public int compareTo​(Unit that)
        Specified by:
        compareTo in interface java.lang.Comparable<Unit>
      • toString

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