clojure.lang
Class Ratio

java.lang.Object
  extended by java.lang.Number
      extended by clojure.lang.Ratio
All Implemented Interfaces:
Serializable, Comparable

public class Ratio
extends Number
implements Comparable

See Also:
Serialized Form

Field Summary
 BigInteger denominator
           
 BigInteger numerator
           
 
Constructor Summary
Ratio(BigInteger numerator, BigInteger denominator)
           
 
Method Summary
 BigInteger bigIntegerValue()
           
 int compareTo(Object o)
           
 BigDecimal decimalValue()
           
 BigDecimal decimalValue(MathContext mc)
           
 double doubleValue()
           
 boolean equals(Object arg0)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

numerator

public final BigInteger numerator

denominator

public final BigInteger denominator
Constructor Detail

Ratio

public Ratio(BigInteger numerator,
             BigInteger denominator)
Method Detail

equals

public boolean equals(Object arg0)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

decimalValue

public BigDecimal decimalValue()

decimalValue

public BigDecimal decimalValue(MathContext mc)

bigIntegerValue

public BigInteger bigIntegerValue()

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Copyright © 2015. All Rights Reserved.