fr.ocelet.runtime.otypes
Class Oreal
java.lang.Object
fr.ocelet.runtime.otypes.Oreal
- All Implemented Interfaces:
- Onumber, Otype
- Direct Known Subclasses:
- Ovolume
public class Oreal
- extends java.lang.Object
- implements Onumber
Implementation of the Ocelet type real.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Oreal
public Oreal()
Oreal
public Oreal(double d)
Oreal
public Oreal(int i)
Oreal
public Oreal(long l)
Oreal
public Oreal(float f)
Oreal
public Oreal(java.lang.String s)
compareTo
public int compareTo(Onumber n)
- Comparison operator.
- Specified by:
compareTo in interface Onumber
- Parameters:
n - Onumber to compare to this one
- Returns:
- -1 if this < n; this = n; 1 if this > n
equals
public boolean equals(Onumber n)
- Specified by:
equals in interface Onumber
- Returns:
- true if this == n
add
public <T extends Onumber> T add(T n)
- Specified by:
add in interface Onumber
- Returns:
- A new Oreal that is the sum of this and n
sub
public <T extends Onumber> T sub(T n)
- Specified by:
sub in interface Onumber
- Returns:
- this - n as a new Oreal
mult
public <T extends Onumber> T mult(T n)
- Specified by:
mult in interface Onumber
- Returns:
- this * n as a new Oreal
div
public <T extends Onumber> T div(T n)
- Specified by:
div in interface Onumber
- Returns:
- this / n as a new Oreal
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object