Record Class TranscodingErrorHandler.ReplacementString
java.lang.Object
java.lang.Record
com.oracle.truffle.api.strings.TranscodingErrorHandler.ReplacementString
- Record Components:
replacement
- the string to use as replacement for the erroneous region in the source string.byteLength
- the byte length of the region to replace. If this value is negative, let the transcoder determine the region length instead.
- Enclosing interface:
TranscodingErrorHandler
public static record TranscodingErrorHandler.ReplacementString(TruffleString replacement, int byteLength)
extends Record
Result type of
TranscodingErrorHandler.apply(AbstractTruffleString, int, int, TruffleString.Encoding, TruffleString.Encoding)
.- Since:
- 23.1
-
Constructor Summary
ConstructorsConstructorDescriptionReplacementString
(TruffleString replacement, int byteLength) Creates an instance of aReplacementString
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thebyteLength
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thereplacement
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ReplacementString
Creates an instance of aReplacementString
record class.- Parameters:
replacement
- the value for thereplacement
record componentbyteLength
- the value for thebyteLength
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
replacement
Returns the value of thereplacement
record component.- Returns:
- the value of the
replacement
record component
-
byteLength
public int byteLength()Returns the value of thebyteLength
record component.- Returns:
- the value of the
byteLength
record component
-