Class Rational

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Rational>

    public final class Rational
    extends java.lang.Number
    implements java.lang.Comparable<Rational>
    Deprecated.
    Use com.twelvemonkeys.imageio.metadata.tiff.Rational instead.
    Represents a rational number with a long numerator and long denominator. Rational numbers are stored in reduced form with the sign stored with the numerator. Rationals are immutable.
    Version:
    $Id: Rational.java,v 1.0 Nov 18, 2009 1:12:00 AM haraldk Exp$
    Author:
    Harald Kuhr, last modified by $Author: haraldk$
    See Also:
    Serialized Form
    • Constructor Detail

      • Rational

        public Rational​(long pNumber)
        Deprecated.
      • Rational

        public Rational​(long pNumerator,
                        long pDenominator)
        Deprecated.
    • Method Detail

      • numerator

        public long numerator()
        Deprecated.
      • denominator

        public long denominator()
        Deprecated.
      • byteValue

        public byte byteValue()
        Deprecated.
        Overrides:
        byteValue in class java.lang.Number
      • shortValue

        public short shortValue()
        Deprecated.
        Overrides:
        shortValue in class java.lang.Number
      • intValue

        public int intValue()
        Deprecated.
        Specified by:
        intValue in class java.lang.Number
      • longValue

        public long longValue()
        Deprecated.
        Specified by:
        longValue in class java.lang.Number
      • floatValue

        public float floatValue()
        Deprecated.
        Specified by:
        floatValue in class java.lang.Number
      • doubleValue

        public double doubleValue()
        Deprecated.
        Specified by:
        doubleValue in class java.lang.Number
      • compareTo

        public int compareTo​(Rational pOther)
        Deprecated.
        Specified by:
        compareTo in interface java.lang.Comparable<Rational>
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object pOther)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • toString

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