Package net.blakez.bppmq.core
Record Class Error
java.lang.Object
java.lang.Record
net.blakez.bppmq.core.Error
- Record Components:
errorType
- A string identifying the category of the error.errorMsg
- A descriptive message detailing the error.
Represents an error with a type and message.
- Author:
- Peter Blakeley : @pblakez pb@blakez.org
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.errorMsg()
Returns the value of theerrorMsg
record component.Returns the value of theerrorType
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Checks if the error type matches the provided string.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
is
Checks if the error type matches the provided string.- Parameters:
errorType
- The error type string to compare against.- Returns:
- true if the error types match, false otherwise.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
errorType
Returns the value of theerrorType
record component.- Returns:
- the value of the
errorType
record component
-
errorMsg
Returns the value of theerrorMsg
record component.- Returns:
- the value of the
errorMsg
record component
-