uk.ac.man.cs.rainbow.datamodel
Class Type.Boolean

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.datamodel.Type
        |
        +--uk.ac.man.cs.rainbow.datamodel.Type.Boolean
All Implemented Interfaces:
Argument, Data.Word.RestrictingT, Data.Word.T, Serializable, Type
Enclosing class:
Type

public static class Type.Boolean
extends Type
implements Data.Word.RestrictingT

The class of types of booleans.

See Also:
Data.Word, Serialized Form

Inner classes inherited from class uk.ac.man.cs.rainbow.datamodel.Type
Type.Boolean, Type.Enum, Type.Integer, Type.Tuple, Type.Union, Type.Vector
 
Field Summary
static Type.Boolean instance
          Standard instance of Boolean.
 
Constructor Summary
Type.Boolean()
           
 
Method Summary
 boolean equals(Type t)
          All instances are equal.
 int hashCode()
          Hash all instances the same way.
 String render(int value)
          How to display a Boolean value.
 int restrict(int value)
          Value range restriction operation.
 String toString()
          How to display an instance of Boolean.
 
Methods inherited from class uk.ac.man.cs.rainbow.datamodel.Type
compatableWith, equals, parse, parse, subst
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

instance

public static Type.Boolean instance
Standard instance of Boolean. There only needs to be one instance of this class, as it has no internal data anyway, and none of its instances can be distinguished.
Constructor Detail

Type.Boolean

public Type.Boolean()
Method Detail

toString

public String toString()
How to display an instance of Boolean.
Overrides:
toString in class Type

render

public String render(int value)
How to display a Boolean value.
Specified by:
render in interface Data.Word.T

restrict

public int restrict(int value)
Value range restriction operation. When converting some other word-type to a Boolean, this makes sure that the value used internally to represent the Boolean value is legal.
Specified by:
restrict in interface Data.Word.RestrictingT

equals

public boolean equals(Type t)
All instances are equal.
Overrides:
equals in class Type

hashCode

public int hashCode()
Hash all instances the same way.
Overrides:
hashCode in class Object