Class SPIProbeFailure
- java.lang.Object
-
- com.io7m.coffeepick.runtime.parser.spi.SPIProbeFailure
-
- All Implemented Interfaces:
SPIProbeResultType,SPIProbeResultType.SPIProbeFailureType
public final class SPIProbeFailure extends java.lang.Object implements SPIProbeResultType.SPIProbeFailureType
Probing failed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSPIProbeFailure.BuilderBuilds instances of typeSPIProbeFailure.-
Nested classes/interfaces inherited from interface com.io7m.coffeepick.runtime.parser.spi.SPIProbeResultType
SPIProbeResultType.Kind, SPIProbeResultType.SPIProbeFailureType, SPIProbeResultType.SPIProbeSuccessType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SPIProbeFailure.Builderbuilder()Creates a builder forSPIProbeFailure.static SPIProbeFailurecopyOf(SPIProbeResultType.SPIProbeFailureType instance)Creates an immutable copy of aSPIProbeResultType.SPIProbeFailureTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofSPIProbeFailurethat have equal attribute values.java.util.Optional<java.lang.Exception>error()inthashCode()Computes a hash code from attributes:error.java.lang.StringtoString()Prints the immutable valueSPIProbeFailurewith attribute values.SPIProbeFailurewithError(java.lang.Exception value)Copy the current immutable object by setting a present value for the optionalerrorattribute.SPIProbeFailurewithError(java.util.Optional<? extends java.lang.Exception> optional)Copy the current immutable object by setting an optional value for theerrorattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.coffeepick.runtime.parser.spi.SPIProbeResultType.SPIProbeFailureType
kind
-
-
-
-
Method Detail
-
error
public java.util.Optional<java.lang.Exception> error()
- Specified by:
errorin interfaceSPIProbeResultType.SPIProbeFailureType- Returns:
- The exception encountered, if any
-
withError
public final SPIProbeFailure withError(java.lang.Exception value)
Copy the current immutable object by setting a present value for the optionalerrorattribute.- Parameters:
value- The value for error- Returns:
- A modified copy of
thisobject
-
withError
public final SPIProbeFailure withError(java.util.Optional<? extends java.lang.Exception> optional)
Copy the current immutable object by setting an optional value for theerrorattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for error- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSPIProbeFailurethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:error.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSPIProbeFailurewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static SPIProbeFailure copyOf(SPIProbeResultType.SPIProbeFailureType instance)
Creates an immutable copy of aSPIProbeResultType.SPIProbeFailureTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SPIProbeFailure instance
-
builder
public static SPIProbeFailure.Builder builder()
Creates a builder forSPIProbeFailure.SPIProbeFailure.builder() .setError(Exception) // optionalerror.build();- Returns:
- A new SPIProbeFailure builder
-
-