Package com.io7m.waxmill.machines
Class WXMDeviceFramebuffer.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMDeviceFramebuffer.Builder
- Enclosing class:
- WXMDeviceFramebuffer
public static final class WXMDeviceFramebuffer.Builder
extends java.lang.Object
Builds instances of type
WXMDeviceFramebuffer.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and Type Method Description WXMDeviceFramebufferbuild()Builds a newWXMDeviceFramebuffer.WXMDeviceFramebuffer.Builderfrom(WXMDeviceType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceTypeinstance.WXMDeviceFramebuffer.Builderfrom(WXMDeviceType.WXMDeviceFramebufferType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMDeviceFramebufferTypeinstance.WXMDeviceFramebuffer.BuildersetComment(java.lang.String comment)Initializes the value for thecommentattribute.WXMDeviceFramebuffer.BuildersetDeviceSlot(WXMDeviceSlot deviceSlot)Initializes the value for thedeviceSlotattribute.WXMDeviceFramebuffer.BuildersetHeight(int height)Initializes the value for theheightattribute.WXMDeviceFramebuffer.BuildersetListenAddress(java.net.InetAddress listenAddress)Initializes the value for thelistenAddressattribute.WXMDeviceFramebuffer.BuildersetListenPort(int listenPort)Initializes the value for thelistenPortattribute.WXMDeviceFramebuffer.BuildersetVgaConfiguration(WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfiguration vgaConfiguration)Initializes the value for thevgaConfigurationattribute.WXMDeviceFramebuffer.BuildersetWaitForVNC(boolean waitForVNC)Initializes the value for thewaitForVNCattribute.WXMDeviceFramebuffer.BuildersetWidth(int width)Initializes the value for thewidthattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMDeviceFramebufferTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setComment
Initializes the value for thecommentattribute.If not set, this attribute will have a default value as returned by the initializer of
comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for use in a chained invocation
-
setDeviceSlot
Initializes the value for thedeviceSlotattribute.- Parameters:
deviceSlot- The value for deviceSlot- Returns:
thisbuilder for use in a chained invocation
-
setListenAddress
Initializes the value for thelistenAddressattribute.- Parameters:
listenAddress- The value for listenAddress- Returns:
thisbuilder for use in a chained invocation
-
setListenPort
Initializes the value for thelistenPortattribute.- Parameters:
listenPort- The value for listenPort- Returns:
thisbuilder for use in a chained invocation
-
setWidth
Initializes the value for thewidthattribute.If not set, this attribute will have a default value as returned by the initializer of
width.- Parameters:
width- The value for width- Returns:
thisbuilder for use in a chained invocation
-
setHeight
Initializes the value for theheightattribute.If not set, this attribute will have a default value as returned by the initializer of
height.- Parameters:
height- The value for height- Returns:
thisbuilder for use in a chained invocation
-
setVgaConfiguration
public final WXMDeviceFramebuffer.Builder setVgaConfiguration(WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfiguration vgaConfiguration)Initializes the value for thevgaConfigurationattribute.If not set, this attribute will have a default value as returned by the initializer of
vgaConfiguration.- Parameters:
vgaConfiguration- The value for vgaConfiguration- Returns:
thisbuilder for use in a chained invocation
-
setWaitForVNC
Initializes the value for thewaitForVNCattribute.- Parameters:
waitForVNC- The value for waitForVNC- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMDeviceFramebuffer.- Returns:
- An immutable instance of WXMDeviceFramebuffer
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-