public abstract class AbstractLongConverter extends Object implements LongConverter
LongConverter interface.
This class delegates the core conversion operations to an encapsulated LongConverter instance.
Subclasses can build upon this base while retaining or customizing the behavior of the underlying converter.
| Modifier and Type | Field and Description |
|---|---|
protected LongConverter |
converter |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLongConverter(LongConverter converter)
Constructs an
AbstractLongConverter with a specified converter. |
protected |
AbstractLongConverter(String chars)
Constructs an
AbstractLongConverter using a given set of characters. |
| Modifier and Type | Method and Description |
|---|---|
void |
append(net.openhft.chronicle.bytes.Bytes<?> bytes,
long value)
Appends the provided long value to the provided
Bytes text. |
void |
append(StringBuilder text,
long value)
Appends the provided long value to the provided
StringBuilder text. |
int |
maxParseLength()
Retrieves the maximum number of characters that can be parsed by the underlying converter.
|
long |
parse(CharSequence text)
Parses the provided text using the underlying converter.
|
long |
parse(CharSequence text,
int beginIndex,
int endIndex)
Parses a part of the provided text using the underlying converter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEncode, allSafeChars, allSafeChars, asString, asText, asText, forSymbols, lengthCheck, lengthCheck, maxParseLengthprotected final LongConverter converter
protected AbstractLongConverter(String chars)
AbstractLongConverter using a given set of characters.
Internally, it uses the LongConverter's forSymbols method to create an instance of LongConverter with the provided characters.chars - set of characters to use for conversion.protected AbstractLongConverter(LongConverter converter)
AbstractLongConverter with a specified converter.
This constructor allows subclasses to provide a custom implementation of LongConverter.converter - the underlying LongConverter to be used for conversions.public int maxParseLength()
maxParseLength in interface LongConverterpublic long parse(CharSequence text)
parse in interface LongConvertertext - the text to parse.public long parse(CharSequence text, int beginIndex, int endIndex)
parse in interface LongConvertertext - the text to parse.beginIndex - the beginning index, inclusive.endIndex - the ending index, exclusive.public void append(StringBuilder text, long value)
StringBuilder text.append in interface LongConvertertext - the StringBuilder to append to.value - the long value to convert and append.public void append(net.openhft.chronicle.bytes.Bytes<?> bytes,
long value)
Bytes text.append in interface LongConverterbytes - the Bytes object to append to.value - the long value to convert and append.Copyright © 2024. All rights reserved.