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 classSPIProbeSuccess.BuilderBuilds instances of typeSPIProbeSuccess.-
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 SPIProbeSuccess.Builderbuilder()Creates a builder forSPIProbeSuccess.static SPIProbeSuccesscopyOf(SPIProbeResultType.SPIProbeSuccessType instance)Creates an immutable copy of aSPIProbeResultType.SPIProbeSuccessTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofSPIProbeSuccessthat have equal attribute values.FormatDescriptionformat()inthashCode()Computes a hash code from attributes:format,version.java.lang.StringtoString()Prints the immutable valueSPIProbeSuccesswith attribute values.FormatVersionversion()SPIProbeSuccesswithFormat(FormatDescription value)Copy the current immutable object by setting a value for theformatattribute.SPIProbeSuccesswithVersion(FormatVersion value)Copy the current immutable object by setting a value for theversionattribute.-
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 Detail
-
format
public FormatDescription format()
- Specified by:
formatin interfaceSPIProbeResultType.SPIProbeSuccessType- Returns:
- The format description
-
version
public FormatVersion version()
- Specified by:
versionin interfaceSPIProbeResultType.SPIProbeSuccessType- Returns:
- The format version
-
withFormat
public final SPIProbeSuccess withFormat(FormatDescription value)
Copy the current immutable object by setting a value for theformatattribute. 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
thisobject
-
withVersion
public final SPIProbeSuccess withVersion(FormatVersion value)
Copy the current immutable object by setting a value for theversionattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSPIProbeSuccessthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:format,version.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSPIProbeSuccesswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static SPIProbeSuccess copyOf(SPIProbeResultType.SPIProbeSuccessType instance)
Creates an immutable copy of aSPIProbeResultType.SPIProbeSuccessTypevalue. 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
public static SPIProbeSuccess.Builder builder()
Creates a builder forSPIProbeSuccess.SPIProbeSuccess.builder() .setFormat(com.io7m.coffeepick.runtime.parser.spi.FormatDescription) // requiredformat.setVersion(com.io7m.coffeepick.runtime.parser.spi.FormatVersion) // requiredversion.build();- Returns:
- A new SPIProbeSuccess builder
-
-