public class NanoDurationLongConverter extends Object implements LongConverter
LongConverter for converting durations represented as nanoseconds.
This class operates on long values, converting them to and from Java's Duration.| Constructor and Description |
|---|
NanoDurationLongConverter() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(net.openhft.chronicle.bytes.Bytes<?> bytes,
long value)
Append the ISO-8601 form of the given duration to the supplied
Bytes. |
void |
append(StringBuilder text,
long value)
Append the ISO-8601 form of the given duration to the supplied
StringBuilder. |
long |
parse(CharSequence text)
Parse a duration in ISO-8601 format and return the equivalent value in nanoseconds.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEncode, allSafeChars, asString, asText, asText, forSymbols, lengthCheck, lengthCheck, maxParseLength, maxParseLength, parsepublic long parse(CharSequence text)
parse in interface LongConvertertext - The character sequence representing a duration in ISO-8601 format (e.g., "PT20.345S") to be parsed into total nanoseconds.public void append(StringBuilder text, long value)
StringBuilder.append in interface LongConvertertext - The StringBuilder to which the ISO-8601 string representation of the duration value will be appended.value - The duration, expressed as a total number of nanoseconds, to be formatted and appended.public void append(net.openhft.chronicle.bytes.Bytes<?> bytes,
long value)
Bytes.append in interface LongConverterbytes - The Bytes instance to which the ISO-8601 string representation of the duration value will be appended.value - The duration, expressed as a total number of nanoseconds, to be formatted and appended.Copyright © 2026 Chronicle Software Ltd. All rights reserved.