# Class AprationalField

java.lang.Object
java.lang.Number
org.jscience.mathematics.number.Number<AprationalField>
org.apfloat.jscience.AbstractField<AprationalField, Aprational>
org.apfloat.jscience.AprationalField

All Implemented Interfaces:
  `Serializable, Comparable<AprationalField>, Immutable, Realtime, ValueType, XMLSerializable, Field<AprationalField>, GroupAdditive<AprationalField>, GroupMultiplicative<AprationalField>, Ring<AprationalField>, Structure<AprationalField>`

public class AprationalField extends AbstractField<AprationalField, Aprational>
This class represents an arbitrary precision rational number.

Since:
  1.8.0
Version:
  1.15.0
Author:
  Mikko Tommila
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AprationalField(Aprational value)`
  Constructs a new rational field object with the specified value.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AprationalField`
  `copy()`
  Returns a copy of this object.
  `AprationalField`
  `inverse()`
  Returns the multiplicative inverse of this object.
  `boolean`
  `isLargerThan(AprationalField that)`
  Compares the absolute value of this number with the absolute value of the number specified.
  `AprationalField`
  `opposite()`
  Returns the additive inverse of this object.
  `AprationalField`
  `plus(AprationalField that)`
  Returns the sum of this object with the one specified.
  `AprationalField`
  `times(AprationalField that)`
  Returns the product of this object with the one specified.

  ### Methods inherited from class AbstractField

  `compareTo, doubleValue, equals, hashCode, longValue, toText, value`

  ### Methods inherited from class Number

  `byteValue, floatValue, intValue, isGreaterThan, isLessThan, minus, pow, shortValue, toString`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AprationalField

    public AprationalField(Aprational value)
    Constructs a new rational field object with the specified value.
    Parameters:
      `value` - The value.

- ## Method Details

  - ### plus

    public AprationalField plus(AprationalField that)
    Description copied from class: `AbstractField`
    Returns the sum of this object with the one specified.
    Specified by:
      `plus` in interface `GroupAdditive<AprationalField>`
    Specified by:
      `plus` in class `AbstractField<AprationalField, Aprational>`
    Parameters:
      `that` - The addend.
    Returns:
      `this + that`

  - ### opposite

    public AprationalField opposite()
    Description copied from class: `AbstractField`
    Returns the additive inverse of this object.
    Specified by:
      `opposite` in interface `GroupAdditive<AprationalField>`
    Specified by:
      `opposite` in class `AbstractField<AprationalField, Aprational>`
    Returns:
      `-this`

  - ### times

    public AprationalField times(AprationalField that)
    Description copied from class: `AbstractField`
    Returns the product of this object with the one specified.
    Specified by:
      `times` in interface `GroupMultiplicative<AprationalField>`
    Specified by:
      `times` in interface `Ring<AprationalField>`
    Specified by:
      `times` in class `AbstractField<AprationalField, Aprational>`
    Parameters:
      `that` - The multiplicand.
    Returns:
      `this * that`

  - ### inverse

    public AprationalField inverse() throws ArithmeticException
    Description copied from class: `AbstractField`
    Returns the multiplicative inverse of this object.
    Specified by:
      `inverse` in interface `GroupMultiplicative<AprationalField>`
    Specified by:
      `inverse` in class `AbstractField<AprationalField, Aprational>`
    Returns:
      `1 / this`
    Throws:
      `ArithmeticException` - If the divisor is zero.

  - ### copy

    public AprationalField copy()
    Description copied from class: `AbstractField`
    Returns a copy of this object.
    Specified by:
      `copy` in interface `ValueType`
    Specified by:
      `copy` in class `AbstractField<AprationalField, Aprational>`
    Returns:
      A copy of this object.

  - ### isLargerThan

    public boolean isLargerThan(AprationalField that)
    Description copied from class: `AbstractField`
    Compares the absolute value of this number with the absolute value of the number specified.
    Overrides:
      `isLargerThan` in class `AbstractField<AprationalField, Aprational>`
    Parameters:
      `that` - The number to be compared with.
    Returns:
      `|this| > |that|`