Package io.github.wankdanker.clyops
Record Class ParseResult
java.lang.Object
java.lang.Record
io.github.wankdanker.clyops.ParseResult
public record ParseResult(String status, String error, boolean showUsage, List<String> detail)
extends Record
The outcome of
Cli.parse(java.lang.String...): status is "ok", "help" or "error".-
Constructor Summary
ConstructorsConstructorDescriptionParseResult(String status, String error, boolean showUsage, List<String> detail) Creates an instance of aParseResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondetail()Returns the value of thedetailrecord component.final 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.booleanReturns the value of theshowUsagerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParseResult
Creates an instance of aParseResultrecord class.- Parameters:
status- the value for thestatusrecord componenterror- the value for theerrorrecord componentshowUsage- the value for theshowUsagerecord componentdetail- the value for thedetailrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
showUsage
public boolean showUsage()Returns the value of theshowUsagerecord component.- Returns:
- the value of the
showUsagerecord component
-
detail
Returns the value of thedetailrecord component.- Returns:
- the value of the
detailrecord component
-