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 class
WXMEvaluatedBootConfigurationGRUBBhyve.Builder
Builds instances of typeWXMEvaluatedBootConfigurationGRUBBhyve
. -
Method Summary
Modifier and Type Method Description static WXMEvaluatedBootConfigurationGRUBBhyve.Builder
builder()
Creates a builder forWXMEvaluatedBootConfigurationGRUBBhyve
.WXMEvaluatedBootCommands
commands()
static WXMEvaluatedBootConfigurationGRUBBhyve
copyOf(WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType instance)
Creates an immutable copy of aWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
value.java.util.List<java.lang.String>
deviceMap()
java.nio.file.Path
deviceMapFile()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofWXMEvaluatedBootConfigurationGRUBBhyve
that have equal attribute values.java.util.List<java.lang.String>
grubConfiguration()
java.nio.file.Path
grubConfigurationFile()
int
hashCode()
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.String
toString()
Prints the immutable valueWXMEvaluatedBootConfigurationGRUBBhyve
with attribute values.WXMEvaluatedBootConfigurationGRUBBhyve
withCommands(WXMEvaluatedBootCommands value)
Copy the current immutable object by setting a value for thecommands
attribute.WXMEvaluatedBootConfigurationGRUBBhyve
withDeviceMap(java.lang.Iterable<java.lang.String> elements)
Copy the current immutable object with elements that replace the content ofdeviceMap
.WXMEvaluatedBootConfigurationGRUBBhyve
withDeviceMap(java.lang.String... elements)
Copy the current immutable object with elements that replace the content ofdeviceMap
.WXMEvaluatedBootConfigurationGRUBBhyve
withDeviceMapFile(java.nio.file.Path value)
Copy the current immutable object by setting a value for thedeviceMapFile
attribute.WXMEvaluatedBootConfigurationGRUBBhyve
withGrubConfiguration(java.lang.Iterable<java.lang.String> elements)
Copy the current immutable object with elements that replace the content ofgrubConfiguration
.WXMEvaluatedBootConfigurationGRUBBhyve
withGrubConfiguration(java.lang.String... elements)
Copy the current immutable object with elements that replace the content ofgrubConfiguration
.WXMEvaluatedBootConfigurationGRUBBhyve
withGrubConfigurationFile(java.nio.file.Path value)
Copy the current immutable object by setting a value for thegrubConfigurationFile
attribute.WXMEvaluatedBootConfigurationGRUBBhyve
withRequiredNMDMs(java.lang.Iterable<? extends java.nio.file.Path> elements)
Copy the current immutable object with elements that replace the content ofrequiredNMDMs
.WXMEvaluatedBootConfigurationGRUBBhyve
withRequiredNMDMs(java.nio.file.Path... elements)
Copy the current immutable object with elements that replace the content ofrequiredNMDMs
.WXMEvaluatedBootConfigurationGRUBBhyve
withRequiredPaths(java.lang.Iterable<? extends java.nio.file.Path> elements)
Copy the current immutable object with elements that replace the content ofrequiredPaths
.WXMEvaluatedBootConfigurationGRUBBhyve
withRequiredPaths(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, wait
Methods 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:
requiredPaths
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
- Specified by:
requiredPaths
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationType
- Returns:
- The value of the
requiredPaths
attribute
-
requiredNMDMs
public java.util.Set<java.nio.file.Path> requiredNMDMs()- Specified by:
requiredNMDMs
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
- Specified by:
requiredNMDMs
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationType
- Returns:
- The value of the
requiredNMDMs
attribute
-
commands
- Specified by:
commands
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
- Specified by:
commands
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationType
- Returns:
- The value of the
commands
attribute
-
deviceMapFile
public java.nio.file.Path deviceMapFile()- Specified by:
deviceMapFile
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
- Returns:
- A file that will contain a GRUB device map
-
deviceMap
public java.util.List<java.lang.String> deviceMap()- Specified by:
deviceMap
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
- Returns:
- The lines that will be written to the GRUB device map
-
grubConfigurationFile
public java.nio.file.Path grubConfigurationFile()- Specified by:
grubConfigurationFile
in interfaceWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
- Returns:
- A file that will contain a GRUB configuration
-
grubConfiguration
public java.util.List<java.lang.String> grubConfiguration()- Specified by:
grubConfiguration
in 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
this
object
-
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
this
object
-
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
this
object
-
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
this
object
-
withCommands
Copy the current immutable object by setting a value for thecommands
attribute. 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
this
object
-
withDeviceMapFile
Copy the current immutable object by setting a value for thedeviceMapFile
attribute. 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
this
object
-
withDeviceMap
Copy the current immutable object with elements that replace the content ofdeviceMap
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
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
this
object
-
withGrubConfigurationFile
public final WXMEvaluatedBootConfigurationGRUBBhyve withGrubConfigurationFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thegrubConfigurationFile
attribute. 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
this
object
-
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
this
object
-
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
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMEvaluatedBootConfigurationGRUBBhyve
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:requiredPaths
,requiredNMDMs
,commands
,deviceMapFile
,deviceMap
,grubConfigurationFile
,grubConfiguration
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMEvaluatedBootConfigurationGRUBBhyve
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
public static WXMEvaluatedBootConfigurationGRUBBhyve copyOf(WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType
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 WXMEvaluatedBootConfigurationGRUBBhyve instance
-
builder
Creates a builder forWXMEvaluatedBootConfigurationGRUBBhyve
.WXMEvaluatedBootConfigurationGRUBBhyve.builder() .addRequiredPaths|addAllRequiredPaths(java.nio.file.Path) //
requiredPaths
elements .addRequiredNMDMs|addAllRequiredNMDMs(java.nio.file.Path) //requiredNMDMs
elements .setCommands(com.io7m.waxmill.machines.WXMEvaluatedBootCommands) // requiredcommands
.setDeviceMapFile(java.nio.file.Path) // requireddeviceMapFile
.addDeviceMap|addAllDeviceMap(String) //deviceMap
elements .setGrubConfigurationFile(java.nio.file.Path) // requiredgrubConfigurationFile
.addGrubConfiguration|addAllGrubConfiguration(String) //grubConfiguration
elements .build();- Returns:
- A new WXMEvaluatedBootConfigurationGRUBBhyve builder
-