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