- All Implemented Interfaces:
Nat<N2>
public final class N2
extends Num
implements Nat<N2>
A class representing the number 2.
-
Field Summary
Fields
The singleton instance of this class.
-
Method Summary
int
The integer this class represents.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
instance
The singleton instance of this class.
-
Method Details
-
getNum
The integer this class represents.
- Specified by:
getNum
in interface Nat<N2>
- Specified by:
getNum
in class Num
- Returns:
- The literal number 2.