# Class IntApfloatBuilder

java.lang.Object
org.apfloat.internal.IntApfloatBuilder

All Implemented Interfaces:
  `ApfloatBuilder`

public class IntApfloatBuilder extends Object implements ApfloatBuilder
Builder class for building `ApfloatImpl` implementations with the `int` data element type.

Version:
  1.16.0
Author:
  Mikko Tommila

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IntApfloatBuilder()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ApfloatImpl`
  `createApfloat(double value, long precision, int radix)`
  Create a new `ApfloatImpl` instance from a `double`.
  `ApfloatImpl`
  `createApfloat(long value, long precision, int radix)`
  Create a new `ApfloatImpl` instance from a `long`.
  `ApfloatImpl`
  `createApfloat(PushbackReader in, long precision, int radix, boolean isInteger)`
  Create a new `ApfloatImpl` instance reading from a stream.
  `ApfloatImpl`
  `createApfloat(PushbackReader in, long precision, int radix, boolean isInteger, long initialSize)`
  Create a new `ApfloatImpl` instance reading from a stream.
  `ApfloatImpl`
  `createApfloat(String value, long precision, int radix, boolean isInteger)`
  Create a new `ApfloatImpl` instance from a `String`.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IntApfloatBuilder

    public IntApfloatBuilder()
    Default constructor.

- ## Method Details

  - ### createApfloat

    public ApfloatImpl createApfloat(String value, long precision, int radix, boolean isInteger) throws NumberFormatException, ApfloatRuntimeException
    Description copied from interface: `ApfloatBuilder`
    Create a new `ApfloatImpl` instance from a `String`.
    Specified by:
      `createApfloat` in interface `ApfloatBuilder`
    Parameters:
      `value` - The string to be parsed to a number.
      `precision` - The precision of the number (in digits of the radix).
      `radix` - The radix in which the number is created.
      `isInteger` - Specifies if the number to be parsed from the string is to be treated as an integer or not.
    Returns:
      A new `ApfloatImpl`.
    Throws:
      `NumberFormatException` - If the number is not valid.
      `ApfloatRuntimeException`

  - ### createApfloat

    public ApfloatImpl createApfloat(long value, long precision, int radix) throws NumberFormatException, ApfloatRuntimeException
    Description copied from interface: `ApfloatBuilder`
    Create a new `ApfloatImpl` instance from a `long`.
    Specified by:
      `createApfloat` in interface `ApfloatBuilder`
    Parameters:
      `value` - The value of the number.
      `precision` - The precision of the number (in digits of the radix).
      `radix` - The radix in which the number is created.
    Returns:
      A new `ApfloatImpl`.
    Throws:
      `NumberFormatException` - If the number is not valid.
      `ApfloatRuntimeException`

  - ### createApfloat

    public ApfloatImpl createApfloat(double value, long precision, int radix) throws NumberFormatException, ApfloatRuntimeException
    Description copied from interface: `ApfloatBuilder`
    Create a new `ApfloatImpl` instance from a `double`.
    Specified by:
      `createApfloat` in interface `ApfloatBuilder`
    Parameters:
      `value` - The value of the number.
      `precision` - The precision of the number (in digits of the radix).
      `radix` - The radix in which the number is created.
    Returns:
      A new `ApfloatImpl`.
    Throws:
      `NumberFormatException` - If the number is not valid.
      `ApfloatRuntimeException`

  - ### createApfloat

    public ApfloatImpl createApfloat(PushbackReader in, long precision, int radix, boolean isInteger) throws IOException, NumberFormatException, ApfloatRuntimeException
    Description copied from interface: `ApfloatBuilder`
    Create a new `ApfloatImpl` instance reading from a stream.
    Specified by:
      `createApfloat` in interface `ApfloatBuilder`
    Parameters:
      `in` - The stream to read from.
      `precision` - The precision of the number (in digits of the radix).
      `radix` - The radix in which the number is created.
      `isInteger` - Specifies if the number to be parsed from the stream is to be treated as an integer or not.
    Returns:
      A new `ApfloatImpl`.
    Throws:
      `IOException` - If an I/O error occurs accessing the stream.
      `NumberFormatException` - If the number is not valid.
      `ApfloatRuntimeException`

  - ### createApfloat

    public ApfloatImpl createApfloat(PushbackReader in, long precision, int radix, boolean isInteger, long initialSize) throws IOException, NumberFormatException, ApfloatRuntimeException
    Description copied from interface: `ApfloatBuilder`
    Create a new `ApfloatImpl` instance reading from a stream. A hint for the size of the number can be specified.
    Specified by:
      `createApfloat` in interface `ApfloatBuilder`
    Parameters:
      `in` - The stream to read from.
      `precision` - The precision of the number (in digits of the radix).
      `radix` - The radix in which the number is created.
      `isInteger` - Specifies if the number to be parsed from the stream is to be treated as an integer or not.
      `initialSize` - The initially allocated size (in digits of the radix) for the number.
    Returns:
      A new `ApfloatImpl`.
    Throws:
      `IOException` - If an I/O error occurs accessing the stream.
      `NumberFormatException` - If the number is not valid.
      `ApfloatRuntimeException`