Package eu.bandm.tools.ramus.ogma
Class Unit
java.lang.Object
eu.bandm.tools.ramus.ogma.Unit
A data class with no information content. To be used as replacement
for
Void in contexts that do not allow null
values.- See Also:
-
Field Summary
Fields -
Method Summary
-
Field Details
-
unit
The unique instance.
-
-
Method Details
-
toString
-
forget
Returns the unique unit-valued function from some argument type.- Type Parameters:
A- the argument type- Returns:
- the constant function that always returns
unit
-
point
Returns the constant function that maps the unit value to a given value.All functions from (the non-null values of)
Unitto some typeAcan be constructed by this method.- Type Parameters:
A- the result type- Parameters:
value- the result value- Returns:
- a function that can only be applied to
unitand returnsvalue
-