Class ShortForm


  • public final class ShortForm
    extends Form<Short>
    Transformation between a structurally typed Item and a Short.
    • Field Detail

      • unit

        public final Short unit
    • Constructor Detail

      • ShortForm

        public ShortForm​(Short unit)
    • Method Detail

      • unit

        public Short unit()
        Description copied from class: Form
        Returns a default–possibly null–value of type T. Used as the fallback return value when coercing an invalid structural value.
        Overrides:
        unit in class Form<Short>
      • unit

        public Form<Short> unit​(Short unit)
        Description copied from class: Form
        Returns a version of this Form with the given unit value.
        Overrides:
        unit in class Form<Short>
      • type

        public Class<Short> type()
        Description copied from class: Form
        Returns the reified Class of type T.
        Specified by:
        type in class Form<Short>
      • mold

        public Item mold​(Short value)
        Description copied from class: Form
        Converts a nominally typed Java object into its structurally typed equivalent. The returned Item must never be null.
        Specified by:
        mold in class Form<Short>
      • cast

        public Short cast​(Item item)
        Description copied from class: Form
        Converts a structurally typed item into a nominally typed Java object. The passed-in item is assumed to be non-null.
        Specified by:
        cast in class Form<Short>