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 aReplacementStringrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebyteLengthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thereplacementrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReplacementString
Creates an instance of aReplacementStringrecord class.- Parameters:
replacement- the value for thereplacementrecord componentbyteLength- the value for thebyteLengthrecord 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 thecomparemethod from their corresponding wrapper classes. -
replacement
Returns the value of thereplacementrecord component.- Returns:
- the value of the
replacementrecord component
-
byteLength
public int byteLength()Returns the value of thebyteLengthrecord component.- Returns:
- the value of the
byteLengthrecord component
-