public class Ratio
extends java.lang.Object
implements groovy.lang.GroovyObject
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
ZERO |
| Constructor and Description |
|---|
Ratio(int numerator,
int denominator) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
asType(java.lang.Class theClass) |
int |
getDenominator() |
groovy.lang.MetaClass |
getMetaClass() |
int |
getNumerator() |
java.lang.Object |
getProperty(java.lang.String property) |
java.lang.Object |
invokeMethod(java.lang.String method,
java.lang.Object arguments) |
Ratio |
plus(Ratio ratio) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(java.lang.String property,
java.lang.Object value) |
java.math.BigDecimal |
toBigDecimal(int scale,
int roundingMode) |
java.lang.String |
toString() |
public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectpublic java.lang.Object invokeMethod(java.lang.String method,
java.lang.Object arguments)
invokeMethod in interface groovy.lang.GroovyObjectpublic java.lang.Object getProperty(java.lang.String property)
getProperty in interface groovy.lang.GroovyObjectpublic void setProperty(java.lang.String property,
java.lang.Object value)
setProperty in interface groovy.lang.GroovyObjectpublic final int getNumerator()
public final int getDenominator()
public java.math.BigDecimal toBigDecimal(int scale,
int roundingMode)
public java.lang.Object asType(java.lang.Class theClass)
public java.lang.String toString()
toString in class java.lang.Object