java.lang.Object
java.lang.Record
dev.sympho.modular_commands.utils.parse.TryParser.Failure<R,T>
- Type Parameters:
R- The raw type.T- The parsed type.- Record Components:
raw- The raw value.error- The parsing error.
- All Implemented Interfaces:
TryParser.Result<R,T>
public static record TryParser.Failure<R extends @NonNull Object,T extends @NonNull Object> (R extends @NonNull Object raw, InvalidArgumentException error)
extends Record
implements TryParser.Result<R,T>
A result in which the item was invalid.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionFailure(R raw, InvalidArgumentException error) Creates an instance of aFailurerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.item()The parsed item, if parsed successfully.raw()Returns the value of therawrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
item
Description copied from interface:TryParser.ResultThe parsed item, if parsed successfully. -
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). -
raw
Returns the value of therawrecord component. -
error
Returns the value of theerrorrecord component.
-