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
|
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. |
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.
Type.Boolean
public Type.Boolean()
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