Class LongStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.NumberStringConverter<Long>
org.tquadrat.foundation.util.stringconverter.LongStringConverter
- All Implemented Interfaces:
Serializable, StringConverter<Long>
@ClassVersion(sourceVersion="$Id: LongStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class LongStringConverter
extends NumberStringConverter<Long>
The implementation of
NumberStringConverter
Long.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: LongStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $
- Since:
- 0.0.6
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.util.stringconverter.LongStringConverter"
-
Field Summary
FieldsFields inherited from class NumberStringConverter
MSG_InvalidNumberFormatFields inherited from interface StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final LongparseNumber(String value) Parses the given String to a number.static final LongStringConverterprovider()This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.Methods inherited from class NumberStringConverter
fromString, getSubjectClassMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StringConverter
toString
-
Field Details
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
LongStringConverter
public LongStringConverter()Creates a new instance ofLongStringConverter.
-
-
Method Details
-
parseNumber
Parses the given String to a number. The String is notnull, not empty, and it will not contain blanks only. Leading or trailing blanks have been cut off.- Specified by:
parseNumberin classNumberStringConverter<Long>- Parameters:
value- The String to parse.- Returns:
- The number.
- Throws:
NumberFormatException- The given value cannot be parsed to a number.
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
