jfun.parsec
Class Unit

java.lang.Object
  extended byjfun.parsec.Unit
All Implemented Interfaces:
java.io.Serializable

public final class Unit
extends java.lang.Object
implements java.io.Serializable

The class that represents the "unit" concept in functional language. It is the equivalent of haskell ().
This class is a singleton.

Author:
Ben Yu Nov 22, 2004
See Also:
Serialized Form

Method Summary
static Unit instance()
          Get a Unit instance.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()

instance

public static Unit instance()
Get a Unit instance.

Returns:
the singleton object.