Module org.tquadrat.foundation.util
Class HashStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.HashStringConverter
- All Implemented Interfaces:
Serializable,StringConverter<Hash>
@ClassVersion(sourceVersion="$Id: HashStringConverter.java 1045 2023-02-07 23:09:17Z tquadrat $")
@API(status=STABLE,
since="0.1.1")
public final class HashStringConverter
extends Object
implements StringConverter<Hash>
The implementation of
StringConverter
for
String
values representing a hash value. Here it does not matter whether that
hash was produced by MD5, SHA or any other tool.
The hash value is a byte array.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: HashStringConverter.java 1045 2023-02-07 23:09:17Z tquadrat $
- Since:
- 0.1.1
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.util.stringconverter.HashStringConverter"
-
Field Summary
FieldsFields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal HashfromString(CharSequence source) static final HashStringConverterprovider()This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tquadrat.foundation.lang.StringConverter
toString
-
Field Details
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
HashStringConverter
public HashStringConverter()Creates a new instance ofHashStringConverter.
-
-
Method Details
-
fromString
- Specified by:
fromStringin interfaceStringConverter<Hash>- Throws:
IllegalArgumentException
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
