Package com.io7m.waxmill.machines
Class WXMEvaluatedBootConfigurationGRUBBhyve
java.lang.Object
com.io7m.waxmill.machines.WXMEvaluatedBootConfigurationGRUBBhyve
- All Implemented Interfaces:
WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType,WXMBootConfigurationType.WXMEvaluatedBootConfigurationType
public final class WXMEvaluatedBootConfigurationGRUBBhyve extends java.lang.Object implements WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
A set of evaluated commands used to boot with grub-bhyve.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMEvaluatedBootConfigurationGRUBBhyve.BuilderBuilds instances of typeWXMEvaluatedBootConfigurationGRUBBhyve. -
Method Summary
Modifier and Type Method Description static WXMEvaluatedBootConfigurationGRUBBhyve.Builderbuilder()Creates a builder forWXMEvaluatedBootConfigurationGRUBBhyve.WXMEvaluatedBootCommandscommands()static WXMEvaluatedBootConfigurationGRUBBhyvecopyOf(WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveTypevalue.java.util.List<java.lang.String>deviceMap()java.nio.file.PathdeviceMapFile()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMEvaluatedBootConfigurationGRUBBhyvethat have equal attribute values.java.util.List<java.lang.String>grubConfiguration()java.nio.file.PathgrubConfigurationFile()inthashCode()Computes a hash code from attributes:requiredPaths,requiredNMDMs,commands,deviceMapFile,deviceMap,grubConfigurationFile,grubConfiguration.java.util.Set<java.nio.file.Path>requiredNMDMs()java.util.List<java.nio.file.Path>requiredPaths()java.lang.StringtoString()Prints the immutable valueWXMEvaluatedBootConfigurationGRUBBhyvewith attribute values.WXMEvaluatedBootConfigurationGRUBBhyvewithCommands(WXMEvaluatedBootCommands value)Copy the current immutable object by setting a value for thecommandsattribute.WXMEvaluatedBootConfigurationGRUBBhyvewithDeviceMap(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofdeviceMap.WXMEvaluatedBootConfigurationGRUBBhyvewithDeviceMap(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofdeviceMap.WXMEvaluatedBootConfigurationGRUBBhyvewithDeviceMapFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thedeviceMapFileattribute.WXMEvaluatedBootConfigurationGRUBBhyvewithGrubConfiguration(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofgrubConfiguration.WXMEvaluatedBootConfigurationGRUBBhyvewithGrubConfiguration(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofgrubConfiguration.WXMEvaluatedBootConfigurationGRUBBhyvewithGrubConfigurationFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thegrubConfigurationFileattribute.WXMEvaluatedBootConfigurationGRUBBhyvewithRequiredNMDMs(java.lang.Iterable<? extends java.nio.file.Path> elements)Copy the current immutable object with elements that replace the content ofrequiredNMDMs.WXMEvaluatedBootConfigurationGRUBBhyvewithRequiredNMDMs(java.nio.file.Path... elements)Copy the current immutable object with elements that replace the content ofrequiredNMDMs.WXMEvaluatedBootConfigurationGRUBBhyvewithRequiredPaths(java.lang.Iterable<? extends java.nio.file.Path> elements)Copy the current immutable object with elements that replace the content ofrequiredPaths.WXMEvaluatedBootConfigurationGRUBBhyvewithRequiredPaths(java.nio.file.Path... elements)Copy the current immutable object with elements that replace the content ofrequiredPaths.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
checkPreconditions, kind
-
Method Details
-
requiredPaths
public java.util.List<java.nio.file.Path> requiredPaths()- Specified by:
requiredPathsin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Specified by:
requiredPathsin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationType- Returns:
- The value of the
requiredPathsattribute
-
requiredNMDMs
public java.util.Set<java.nio.file.Path> requiredNMDMs()- Specified by:
requiredNMDMsin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Specified by:
requiredNMDMsin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationType- Returns:
- The value of the
requiredNMDMsattribute
-
commands
- Specified by:
commandsin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Specified by:
commandsin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationType- Returns:
- The value of the
commandsattribute
-
deviceMapFile
public java.nio.file.Path deviceMapFile()- Specified by:
deviceMapFilein interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Returns:
- A file that will contain a GRUB device map
-
deviceMap
public java.util.List<java.lang.String> deviceMap()- Specified by:
deviceMapin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Returns:
- The lines that will be written to the GRUB device map
-
grubConfigurationFile
public java.nio.file.Path grubConfigurationFile()- Specified by:
grubConfigurationFilein interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Returns:
- A file that will contain a GRUB configuration
-
grubConfiguration
public java.util.List<java.lang.String> grubConfiguration()- Specified by:
grubConfigurationin interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType- Returns:
- The lines that will be written to the GRUB configuration file
-
withRequiredPaths
public final WXMEvaluatedBootConfigurationGRUBBhyve withRequiredPaths(java.nio.file.Path... elements)Copy the current immutable object with elements that replace the content ofrequiredPaths.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRequiredPaths
public final WXMEvaluatedBootConfigurationGRUBBhyve withRequiredPaths(java.lang.Iterable<? extends java.nio.file.Path> elements)Copy the current immutable object with elements that replace the content ofrequiredPaths. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of requiredPaths elements to set- Returns:
- A modified copy of
thisobject
-
withRequiredNMDMs
public final WXMEvaluatedBootConfigurationGRUBBhyve withRequiredNMDMs(java.nio.file.Path... elements)Copy the current immutable object with elements that replace the content ofrequiredNMDMs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRequiredNMDMs
public final WXMEvaluatedBootConfigurationGRUBBhyve withRequiredNMDMs(java.lang.Iterable<? extends java.nio.file.Path> elements)Copy the current immutable object with elements that replace the content ofrequiredNMDMs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of requiredNMDMs elements to set- Returns:
- A modified copy of
thisobject
-
withCommands
Copy the current immutable object by setting a value for thecommandsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commands- Returns:
- A modified copy of the
thisobject
-
withDeviceMapFile
Copy the current immutable object by setting a value for thedeviceMapFileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deviceMapFile- Returns:
- A modified copy of the
thisobject
-
withDeviceMap
Copy the current immutable object with elements that replace the content ofdeviceMap.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDeviceMap
public final WXMEvaluatedBootConfigurationGRUBBhyve withDeviceMap(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofdeviceMap. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of deviceMap elements to set- Returns:
- A modified copy of
thisobject
-
withGrubConfigurationFile
public final WXMEvaluatedBootConfigurationGRUBBhyve withGrubConfigurationFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thegrubConfigurationFileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for grubConfigurationFile- Returns:
- A modified copy of the
thisobject
-
withGrubConfiguration
public final WXMEvaluatedBootConfigurationGRUBBhyve withGrubConfiguration(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofgrubConfiguration.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGrubConfiguration
public final WXMEvaluatedBootConfigurationGRUBBhyve withGrubConfiguration(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofgrubConfiguration. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of grubConfiguration elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMEvaluatedBootConfigurationGRUBBhyvethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:requiredPaths,requiredNMDMs,commands,deviceMapFile,deviceMap,grubConfigurationFile,grubConfiguration.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMEvaluatedBootConfigurationGRUBBhyvewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static WXMEvaluatedBootConfigurationGRUBBhyve copyOf(WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveTypevalue. 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 WXMEvaluatedBootConfigurationGRUBBhyve instance
-
builder
Creates a builder forWXMEvaluatedBootConfigurationGRUBBhyve.WXMEvaluatedBootConfigurationGRUBBhyve.builder() .addRequiredPaths|addAllRequiredPaths(java.nio.file.Path) //requiredPathselements .addRequiredNMDMs|addAllRequiredNMDMs(java.nio.file.Path) //requiredNMDMselements .setCommands(com.io7m.waxmill.machines.WXMEvaluatedBootCommands) // requiredcommands.setDeviceMapFile(java.nio.file.Path) // requireddeviceMapFile.addDeviceMap|addAllDeviceMap(String) //deviceMapelements .setGrubConfigurationFile(java.nio.file.Path) // requiredgrubConfigurationFile.addGrubConfiguration|addAllGrubConfiguration(String) //grubConfigurationelements .build();- Returns:
- A new WXMEvaluatedBootConfigurationGRUBBhyve builder
-