Class Unit

  • All Implemented Interfaces:

    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

      Modifier and Type Field Description
      static Unit INSTANCE  
    • Constructor Summary

      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()
        toString in class java.lang.Object