The contents of a UTF8String is guaranteed to be a well-formed UTF-8
string.
Note
equals() and hashCode(), along with == and ##, are just as
broken for UTF8String as for Arrays. Use the methods in the
companion object instead. This is unavoidable because we cannot override
equals nor hashCode in an AnyVal.
An immutable UTF-8 string.
The contents of a
UTF8String
is guaranteed to be a well-formed UTF-8 string.equals()
andhashCode()
, along with==
and##
, are just as broken forUTF8String
as forArray
s. Use the methods in the companion object instead. This is unavoidable because we cannot overrideequals
norhashCode
in anAnyVal
.