Class Ratio

  • All Implemented Interfaces:
    groovy.lang.GroovyObject

    public class Ratio
    extends java.lang.Object
    implements groovy.lang.GroovyObject
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Object ZERO  
    • Constructor Summary

      Constructors 
      Constructor Description
      Ratio​(int numerator, int denominator)  
    • Field Detail

      • ZERO

        public static final java.lang.Object ZERO
    • Constructor Detail

      • Ratio

        public Ratio​(int numerator,
                     int denominator)
    • Method Detail

      • getMetaClass

        public groovy.lang.MetaClass getMetaClass()
        Specified by:
        getMetaClass in interface groovy.lang.GroovyObject
      • setMetaClass

        public void setMetaClass​(groovy.lang.MetaClass mc)
        Specified by:
        setMetaClass in interface groovy.lang.GroovyObject
      • invokeMethod

        public java.lang.Object invokeMethod​(java.lang.String method,
                                             java.lang.Object arguments)
        Specified by:
        invokeMethod in interface groovy.lang.GroovyObject
      • getProperty

        public java.lang.Object getProperty​(java.lang.String property)
        Specified by:
        getProperty in interface groovy.lang.GroovyObject
      • setProperty

        public void setProperty​(java.lang.String property,
                                java.lang.Object value)
        Specified by:
        setProperty in interface groovy.lang.GroovyObject
      • getNumerator

        public final int getNumerator()
      • getDenominator

        public final int getDenominator()
      • toBigDecimal

        public java.math.BigDecimal toBigDecimal​(int scale,
                                                 int roundingMode)
      • asType

        public java.lang.Object asType​(java.lang.Class theClass)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object