Class SPIProbeSuccess
java.lang.Object
com.io7m.coffeepick.runtime.parser.spi.SPIProbeSuccess
- All Implemented Interfaces:
SPIProbeResultType
,SPIProbeResultType.SPIProbeSuccessType
public final class SPIProbeSuccess extends java.lang.Object implements SPIProbeResultType.SPIProbeSuccessType
Probing succeeded.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SPIProbeSuccess.Builder
Builds instances of typeSPIProbeSuccess
.Nested classes/interfaces inherited from interface com.io7m.coffeepick.runtime.parser.spi.SPIProbeResultType
SPIProbeResultType.Kind, SPIProbeResultType.SPIProbeFailureType, SPIProbeResultType.SPIProbeSuccessType
-
Method Summary
Modifier and Type Method Description static SPIProbeSuccess.Builder
builder()
Creates a builder forSPIProbeSuccess
.static SPIProbeSuccess
copyOf(SPIProbeResultType.SPIProbeSuccessType instance)
Creates an immutable copy of aSPIProbeResultType.SPIProbeSuccessType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofSPIProbeSuccess
that have equal attribute values.FormatDescription
format()
int
hashCode()
Computes a hash code from attributes:format
,version
.java.lang.String
toString()
Prints the immutable valueSPIProbeSuccess
with attribute values.FormatVersion
version()
SPIProbeSuccess
withFormat(FormatDescription value)
Copy the current immutable object by setting a value for theformat
attribute.SPIProbeSuccess
withVersion(FormatVersion value)
Copy the current immutable object by setting a value for theversion
attribute.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.SPIProbeSuccessType
kind
-
Method Details
-
format
- Specified by:
format
in interfaceSPIProbeResultType.SPIProbeSuccessType
- Returns:
- The format description
-
version
- Specified by:
version
in interfaceSPIProbeResultType.SPIProbeSuccessType
- Returns:
- The format version
-
withFormat
Copy the current immutable object by setting a value for theformat
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for format- Returns:
- A modified copy of the
this
object
-
withVersion
Copy the current immutable object by setting a value for theversion
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for version- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofSPIProbeSuccess
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:format
,version
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueSPIProbeSuccess
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aSPIProbeResultType.SPIProbeSuccessType
value. 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 SPIProbeSuccess instance
-
builder
Creates a builder forSPIProbeSuccess
.SPIProbeSuccess.builder() .setFormat(com.io7m.coffeepick.runtime.parser.spi.FormatDescription) // required
format
.setVersion(com.io7m.coffeepick.runtime.parser.spi.FormatVersion) // requiredversion
.build();- Returns:
- A new SPIProbeSuccess builder
-