Record Class DiagnosticRunRequest
java.lang.Object
java.lang.Record
dev.ua.theroer.magicutils.diagnostics.DiagnosticRunRequest
- Record Components:
mode- execution modeverbose- whether verbose output is enabledtimeout- per-check timeoutfilter- optional check filter
public record DiagnosticRunRequest(DiagnosticMode mode, boolean verbose, Duration timeout, @Nullable Predicate<DiagnosticCheck> filter)
extends Record
Runtime diagnostics execution options.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticRunRequest(DiagnosticMode mode, boolean verbose, Duration timeout, @Nullable Predicate<DiagnosticCheck> filter) Creates a normalized run request. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable Predicate<DiagnosticCheck> filter()Returns the value of thefilterrecord component.final inthashCode()Returns a hash code value for this object.booleanincludes(DiagnosticCheck check) Returns true when a check should be included.mode()Returns the value of themoderecord component.static DiagnosticRunRequestsafe()Safe-mode request with defaults.static DiagnosticRunRequeststandard()Standard-mode request with defaults.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.booleanverbose()Returns the value of theverboserecord component.withFilter(@Nullable Predicate<DiagnosticCheck> filter) Returns a copy with a filter applied.
-
Field Details
-
DEFAULT_TIMEOUT
Default per-check timeout.
-
-
Constructor Details
-
DiagnosticRunRequest
public DiagnosticRunRequest(DiagnosticMode mode, boolean verbose, Duration timeout, @Nullable @Nullable Predicate<DiagnosticCheck> filter) Creates a normalized run request.- Parameters:
mode- execution modeverbose- whether verbose output is enabledtimeout- per-check timeoutfilter- optional check filter
-
-
Method Details
-
safe
-
standard
Standard-mode request with defaults.- Returns:
- STANDARD request
-
withFilter
Returns a copy with a filter applied.- Parameters:
filter- filter to apply- Returns:
- updated request
-
includes
Returns true when a check should be included.- Parameters:
check- candidate check- Returns:
- true when included
-
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. -
mode
-
verbose
-
timeout
-
filter
-