Object CoIntOutput
-
- All Implemented Interfaces:
public class CoIntOutputNon-blocking functions used in the conversion of integer values to string representations. The functions all output digits left-to-right, avoiding the need to allocate a separate object to hold the string representation.
Each of the functions comes in two forms – one that takes a
suspendfunction as its last parameter, and an extension function on theCoOutputtypealias.Peter Wall
-
-
Field Summary
Fields Modifier and Type Field Description public final static CoIntOutputINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitcoOutputInt(Integer i, SuspendFunction1<Character, Unit> out)Output an Intleft-trimmed.final UnitoutputInt(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intleft-trimmed.final UnitcoOutputPositiveInt(Integer i, SuspendFunction1<Character, Unit> out)Output a positive Intleft-trimmed.final UnitoutputPositiveInt(SuspendFunction1<Character, Unit> $self, Integer i)Output a positive Intleft-trimmed.final UnitcoOutputUnsignedInt(Integer i, SuspendFunction1<Character, Unit> out)Output an unsigned Intleft-trimmed.final UnitoutputUnsignedInt(SuspendFunction1<Character, Unit> $self, Integer i)Output an unsigned Intleft-trimmed.final UnitcoOutputIntScaled(Integer i, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)Output an Intleft-trimmed, using a scale parameter to indicate the number of decimal places.final UnitoutputIntScaled(SuspendFunction1<Character, Unit> $self, Integer i, Integer scale, Character separator)Output an Intleft-trimmed, using a scale parameter to indicate the number of decimal places.final UnitcoOutputPositiveIntScaled(Integer i, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)Output a positive Intleft-trimmed, using a scale parameter to indicate the number of decimal places.final UnitoutputPositiveIntScaled(SuspendFunction1<Character, Unit> $self, Integer i, Integer scale, Character separator)final UnitcoOutputLong(Long n, SuspendFunction1<Character, Unit> out)Output a Longleft-trimmed.final UnitoutputLong(SuspendFunction1<Character, Unit> $self, Long n)Output a Longleft-trimmed.final UnitcoOutputPositiveLong(Long n, SuspendFunction1<Character, Unit> out)Output a positive Longleft-trimmed.final UnitoutputPositiveLong(SuspendFunction1<Character, Unit> $self, Long n)Output a positive Longleft-trimmed.final UnitcoOutputUnsignedLong(Long n, SuspendFunction1<Character, Unit> out)Output an unsigned Longleft-trimmed.final UnitoutputUnsignedLong(SuspendFunction1<Character, Unit> $self, Long n)Output an unsigned Longleft-trimmed.final UnitcoOutputLongScaled(Long n, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)final UnitoutputLongScaled(SuspendFunction1<Character, Unit> $self, Long n, Integer scale, Character separator)final UnitcoOutputPositiveLongScaled(Long n, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)final UnitoutputPositiveLongScaled(SuspendFunction1<Character, Unit> $self, Long n, Integer scale, Character separator)final UnitcoOutput1Digit(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas a single decimal digit.final Unitoutput1Digit(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas a single decimal digit.final UnitcoOutput1DigitSafe(Integer i, SuspendFunction1<Character, Unit> out)Output the least significant decimal digit of an Int.final Unitoutput1DigitSafe(SuspendFunction1<Character, Unit> $self, Integer i)Output the least significant decimal digit of an Int.final UnitcoOutput2Digits(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas two decimal digits.final Unitoutput2Digits(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas two decimal digits.final UnitcoOutput2DigitsSafe(Integer i, SuspendFunction1<Character, Unit> out)Output the least significant two decimal digits of an Int.final Unitoutput2DigitsSafe(SuspendFunction1<Character, Unit> $self, Integer i)Output the least significant two decimal digits of an Int.final UnitcoOutput3Digits(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas three decimal digits.final Unitoutput3Digits(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas three decimal digits.final UnitcoOutput3DigitsSafe(Integer i, SuspendFunction1<Character, Unit> out)Output the least significant three decimal digits of an Int.final Unitoutput3DigitsSafe(SuspendFunction1<Character, Unit> $self, Integer i)Output the least significant three decimal digits of an Int.final UnitcoOutputIntGrouped(Integer i, Character groupingChar, SuspendFunction1<Character, Unit> out)Output an Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitoutputIntGrouped(SuspendFunction1<Character, Unit> $self, Integer i, Character groupingChar)Output an Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitcoOutputPositiveIntGrouped(Integer i, Character groupingChar, SuspendFunction1<Character, Unit> out)Output a positive Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitoutputPositiveIntGrouped(SuspendFunction1<Character, Unit> $self, Integer i, Character groupingChar)Output a positive Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitcoOutputLongGrouped(Long n, Character groupingChar, SuspendFunction1<Character, Unit> out)Output a Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitoutputLongGrouped(SuspendFunction1<Character, Unit> $self, Long n, Character groupingChar)Output a Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitcoOutputPositiveLongGrouped(Long n, Character groupingChar, SuspendFunction1<Character, Unit> out)Output a positive Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitoutputPositiveLongGrouped(SuspendFunction1<Character, Unit> $self, Long n, Character groupingChar)Output a positive Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.final UnitcoOutputIntHex(Integer i, SuspendFunction1<Character, Unit> out)Output an Intleft-trimmed in hexadecimal.final UnitoutputIntHex(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intleft-trimmed in hexadecimal.final UnitcoOutputIntHexLC(Integer i, SuspendFunction1<Character, Unit> out)Output an Intleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.final UnitoutputIntHexLC(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.final UnitcoOutputLongHex(Long n, SuspendFunction1<Character, Unit> out)Output a Longleft-trimmed in hexadecimal.final UnitoutputLongHex(SuspendFunction1<Character, Unit> $self, Long n)Output a Longleft-trimmed in hexadecimal.final UnitcoOutputLongHexLC(Long n, SuspendFunction1<Character, Unit> out)Output a Longleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.final UnitoutputLongHexLC(SuspendFunction1<Character, Unit> $self, Long n)Output a Longleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.final UnitcoOutput8Hex(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas eight hexadecimal digits.final Unitoutput8Hex(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas eight hexadecimal digits.final UnitcoOutput8HexLC(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas eight hexadecimal digits, using lower-case for the alphabetic characters.final Unitoutput8HexLC(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas eight hexadecimal digits, using lower-case for the alphabetic characters.final UnitcoOutput4Hex(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas four hexadecimal digits.final Unitoutput4Hex(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas four hexadecimal digits.final UnitcoOutput4HexLC(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas four hexadecimal digits, using lower-case for the alphabetic characters.final Unitoutput4HexLC(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas four hexadecimal digits, using lower-case for the alphabetic characters.final UnitcoOutput2Hex(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas two hexadecimal digits.final Unitoutput2Hex(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas two hexadecimal digits.final UnitcoOutput2HexLC(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas two hexadecimal digits, using lower-case for the alphabetic characters.final Unitoutput2HexLC(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas two hexadecimal digits, using lower-case for the alphabetic characters.final UnitcoOutput1Hex(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas a single hexadecimal digit.final Unitoutput1Hex(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas a single hexadecimal digit.final UnitcoOutput1HexLC(Integer i, SuspendFunction1<Character, Unit> out)Output an Intas a single hexadecimal digit, using lower-case for the alphabetic characters.final Unitoutput1HexLC(SuspendFunction1<Character, Unit> $self, Integer i)Output an Intas a single hexadecimal digit, using lower-case for the alphabetic characters.-
-
Method Detail
-
coOutputInt
final Unit coOutputInt(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intleft-trimmed.
-
outputInt
final Unit outputInt(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intleft-trimmed.
-
coOutputPositiveInt
final Unit coOutputPositiveInt(Integer i, SuspendFunction1<Character, Unit> out)
Output a positive
Intleft-trimmed.
-
outputPositiveInt
final Unit outputPositiveInt(SuspendFunction1<Character, Unit> $self, Integer i)
Output a positive
Intleft-trimmed.
-
coOutputUnsignedInt
final Unit coOutputUnsignedInt(Integer i, SuspendFunction1<Character, Unit> out)
Output an unsigned
Intleft-trimmed.
-
outputUnsignedInt
final Unit outputUnsignedInt(SuspendFunction1<Character, Unit> $self, Integer i)
Output an unsigned
Intleft-trimmed.
-
coOutputIntScaled
final Unit coOutputIntScaled(Integer i, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)
Output an
Intleft-trimmed, using a scale parameter to indicate the number of decimal places.Negative scale values (indicating that decimal point is to the right of the last digit) are ignored. It is left to the user to decide whether to output additional zeros following the number, or to add an exponent suffix.
-
outputIntScaled
final Unit outputIntScaled(SuspendFunction1<Character, Unit> $self, Integer i, Integer scale, Character separator)
Output an
Intleft-trimmed, using a scale parameter to indicate the number of decimal places.Negative scale values (indicating that decimal point is to the right of the last digit) are ignored. It is left to the user to decide whether to output additional zeros following the number, or to add an exponent suffix.
-
coOutputPositiveIntScaled
final Unit coOutputPositiveIntScaled(Integer i, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)
Output a positive
Intleft-trimmed, using a scale parameter to indicate the number of decimal places.Negative scale values (indicating that decimal point is to the right of the last digit) are ignored. It is left to the user to decide whether to output additional zeros following the number, or to add an exponent suffix.
-
outputPositiveIntScaled
final Unit outputPositiveIntScaled(SuspendFunction1<Character, Unit> $self, Integer i, Integer scale, Character separator)
-
coOutputLong
final Unit coOutputLong(Long n, SuspendFunction1<Character, Unit> out)
Output a
Longleft-trimmed.
-
outputLong
final Unit outputLong(SuspendFunction1<Character, Unit> $self, Long n)
Output a
Longleft-trimmed.
-
coOutputPositiveLong
final Unit coOutputPositiveLong(Long n, SuspendFunction1<Character, Unit> out)
Output a positive
Longleft-trimmed.
-
outputPositiveLong
final Unit outputPositiveLong(SuspendFunction1<Character, Unit> $self, Long n)
Output a positive
Longleft-trimmed.
-
coOutputUnsignedLong
final Unit coOutputUnsignedLong(Long n, SuspendFunction1<Character, Unit> out)
Output an unsigned
Longleft-trimmed.
-
outputUnsignedLong
final Unit outputUnsignedLong(SuspendFunction1<Character, Unit> $self, Long n)
Output an unsigned
Longleft-trimmed.
-
coOutputLongScaled
final Unit coOutputLongScaled(Long n, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)
-
outputLongScaled
final Unit outputLongScaled(SuspendFunction1<Character, Unit> $self, Long n, Integer scale, Character separator)
-
coOutputPositiveLongScaled
final Unit coOutputPositiveLongScaled(Long n, Integer scale, Character separator, SuspendFunction1<Character, Unit> out)
-
outputPositiveLongScaled
final Unit outputPositiveLongScaled(SuspendFunction1<Character, Unit> $self, Long n, Integer scale, Character separator)
-
coOutput1Digit
final Unit coOutput1Digit(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas a single decimal digit. Note that there is no range check on the input value; to append the least significant digit in cases where the value is not guaranteed to be in the range 0..9, use #coOutput1DigitSafe.
-
output1Digit
final Unit output1Digit(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas a single decimal digit. Note that there is no range check on the input value; to append the least significant digit in cases where the value is not guaranteed to be in the range 0..9, use #output1DigitSafe.
-
coOutput1DigitSafe
final Unit coOutput1DigitSafe(Integer i, SuspendFunction1<Character, Unit> out)
Output the least significant decimal digit of an
Int.
-
output1DigitSafe
final Unit output1DigitSafe(SuspendFunction1<Character, Unit> $self, Integer i)
Output the least significant decimal digit of an
Int.
-
coOutput2Digits
final Unit coOutput2Digits(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas two decimal digits. Note that there is no range check on the input value; to append the least significant two digits in cases where the value is not guaranteed to be in the range 00..99, use #coOutput2DigitsSafe.
-
output2Digits
final Unit output2Digits(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas two decimal digits. Note that there is no range check on the input value; to append the least significant two digits in cases where the value is not guaranteed to be in the range 00..99, use #output2DigitsSafe.
-
coOutput2DigitsSafe
final Unit coOutput2DigitsSafe(Integer i, SuspendFunction1<Character, Unit> out)
Output the least significant two decimal digits of an
Int.
-
output2DigitsSafe
final Unit output2DigitsSafe(SuspendFunction1<Character, Unit> $self, Integer i)
Output the least significant two decimal digits of an
Int.
-
coOutput3Digits
final Unit coOutput3Digits(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas three decimal digits. Note that there is no range check on the input value; to append the least significant three digits in cases where the value is not guaranteed to be in the range 000..999, use #coOutput3DigitsSafe.
-
output3Digits
final Unit output3Digits(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas three decimal digits. Note that there is no range check on the input value; to append the least significant three digits in cases where the value is not guaranteed to be in the range 000..999, use #output3DigitsSafe.
-
coOutput3DigitsSafe
final Unit coOutput3DigitsSafe(Integer i, SuspendFunction1<Character, Unit> out)
Output the least significant three decimal digits of an
Int.
-
output3DigitsSafe
final Unit output3DigitsSafe(SuspendFunction1<Character, Unit> $self, Integer i)
Output the least significant three decimal digits of an
Int.
-
coOutputIntGrouped
final Unit coOutputIntGrouped(Integer i, Character groupingChar, SuspendFunction1<Character, Unit> out)
Output an
Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
outputIntGrouped
final Unit outputIntGrouped(SuspendFunction1<Character, Unit> $self, Integer i, Character groupingChar)
Output an
Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
coOutputPositiveIntGrouped
final Unit coOutputPositiveIntGrouped(Integer i, Character groupingChar, SuspendFunction1<Character, Unit> out)
Output a positive
Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
outputPositiveIntGrouped
final Unit outputPositiveIntGrouped(SuspendFunction1<Character, Unit> $self, Integer i, Character groupingChar)
Output a positive
Intleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
coOutputLongGrouped
final Unit coOutputLongGrouped(Long n, Character groupingChar, SuspendFunction1<Character, Unit> out)
Output a
Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
outputLongGrouped
final Unit outputLongGrouped(SuspendFunction1<Character, Unit> $self, Long n, Character groupingChar)
Output a
Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
coOutputPositiveLongGrouped
final Unit coOutputPositiveLongGrouped(Long n, Character groupingChar, SuspendFunction1<Character, Unit> out)
Output a positive
Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
outputPositiveLongGrouped
final Unit outputPositiveLongGrouped(SuspendFunction1<Character, Unit> $self, Long n, Character groupingChar)
Output a positive
Longleft-trimmed with digits grouped in 3s, separated by a specified grouping character.
-
coOutputIntHex
final Unit coOutputIntHex(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intleft-trimmed in hexadecimal.
-
outputIntHex
final Unit outputIntHex(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intleft-trimmed in hexadecimal.
-
coOutputIntHexLC
final Unit coOutputIntHexLC(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.
-
outputIntHexLC
final Unit outputIntHexLC(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.
-
coOutputLongHex
final Unit coOutputLongHex(Long n, SuspendFunction1<Character, Unit> out)
Output a
Longleft-trimmed in hexadecimal.
-
outputLongHex
final Unit outputLongHex(SuspendFunction1<Character, Unit> $self, Long n)
Output a
Longleft-trimmed in hexadecimal.
-
coOutputLongHexLC
final Unit coOutputLongHexLC(Long n, SuspendFunction1<Character, Unit> out)
Output a
Longleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.
-
outputLongHexLC
final Unit outputLongHexLC(SuspendFunction1<Character, Unit> $self, Long n)
Output a
Longleft-trimmed in hexadecimal, using lower-case for the alphabetic characters.
-
coOutput8Hex
final Unit coOutput8Hex(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas eight hexadecimal digits.
-
output8Hex
final Unit output8Hex(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas eight hexadecimal digits.
-
coOutput8HexLC
final Unit coOutput8HexLC(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas eight hexadecimal digits, using lower-case for the alphabetic characters.
-
output8HexLC
final Unit output8HexLC(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas eight hexadecimal digits, using lower-case for the alphabetic characters.
-
coOutput4Hex
final Unit coOutput4Hex(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas four hexadecimal digits.
-
output4Hex
final Unit output4Hex(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas four hexadecimal digits.
-
coOutput4HexLC
final Unit coOutput4HexLC(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas four hexadecimal digits, using lower-case for the alphabetic characters.
-
output4HexLC
final Unit output4HexLC(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas four hexadecimal digits, using lower-case for the alphabetic characters.
-
coOutput2Hex
final Unit coOutput2Hex(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas two hexadecimal digits.
-
output2Hex
final Unit output2Hex(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas two hexadecimal digits.
-
coOutput2HexLC
final Unit coOutput2HexLC(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas two hexadecimal digits, using lower-case for the alphabetic characters.
-
output2HexLC
final Unit output2HexLC(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas two hexadecimal digits, using lower-case for the alphabetic characters.
-
coOutput1Hex
final Unit coOutput1Hex(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas a single hexadecimal digit.
-
output1Hex
final Unit output1Hex(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas a single hexadecimal digit.
-
coOutput1HexLC
final Unit coOutput1HexLC(Integer i, SuspendFunction1<Character, Unit> out)
Output an
Intas a single hexadecimal digit, using lower-case for the alphabetic characters.
-
output1HexLC
final Unit output1HexLC(SuspendFunction1<Character, Unit> $self, Integer i)
Output an
Intas a single hexadecimal digit, using lower-case for the alphabetic characters.
-
-
-
-