public class IntApfloatBuilder extends Object implements ApfloatBuilder
ApfloatImpl implementations with the
int data element type.| Constructor and Description |
|---|
IntApfloatBuilder()
Default constructor.
|
| Modifier and Type | Method and 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(String value,
long precision,
int radix,
boolean isInteger)
Create a new
ApfloatImpl instance from a String. |
public ApfloatImpl createApfloat(String value, long precision, int radix, boolean isInteger) throws NumberFormatException, ApfloatRuntimeException
ApfloatBuilderApfloatImpl instance from a String.createApfloat in interface ApfloatBuildervalue - 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.ApfloatImpl.NumberFormatException - If the number is not valid.ApfloatRuntimeExceptionpublic ApfloatImpl createApfloat(long value, long precision, int radix) throws NumberFormatException, ApfloatRuntimeException
ApfloatBuilderApfloatImpl instance from a long.createApfloat in interface ApfloatBuildervalue - 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.ApfloatImpl.NumberFormatException - If the number is not valid.ApfloatRuntimeExceptionpublic ApfloatImpl createApfloat(double value, long precision, int radix) throws NumberFormatException, ApfloatRuntimeException
ApfloatBuilderApfloatImpl instance from a double.createApfloat in interface ApfloatBuildervalue - 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.ApfloatImpl.NumberFormatException - If the number is not valid.ApfloatRuntimeExceptionpublic ApfloatImpl createApfloat(PushbackReader in, long precision, int radix, boolean isInteger) throws IOException, NumberFormatException, ApfloatRuntimeException
ApfloatBuilderApfloatImpl instance reading from a stream.createApfloat in interface ApfloatBuilderin - 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.ApfloatImpl.IOException - If an I/O error occurs accessing the stream.NumberFormatException - If the number is not valid.ApfloatRuntimeExceptionCopyright © 2024. All rights reserved.