Package com.io7m.waxmill.machines
Class WXMTap.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMTap.Builder
- Enclosing class:
- WXMTap
public static final class WXMTap.Builder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description WXMTap.BuilderaddAllGroups(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)Adds elements togroupslist.WXMTap.BuilderaddGroups(WXMInterfaceGroupName element)Adds one element togroupslist.WXMTap.BuilderaddGroups(WXMInterfaceGroupName... elements)Adds elements togroupslist.WXMTapbuild()Builds a newWXMTap.WXMTap.Builderfrom(WXMNetworkDeviceBackendType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMNetworkDeviceBackendTypeinstance.WXMTap.Builderfrom(WXMTapType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMTapTypeinstance.WXMTap.BuildersetComment(java.lang.String comment)Initializes the value for thecommentattribute.WXMTap.BuildersetGroups(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)Sets or replaces all elements forgroupslist.WXMTap.BuildersetGuestMAC(WXMMACAddress guestMAC)Initializes the value for theguestMACattribute.WXMTap.BuildersetHostMAC(WXMMACAddress hostMAC)Initializes the value for thehostMACattribute.WXMTap.BuildersetName(WXMTAPDeviceName name)Initializes the value for thenameattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMTapTypeinstance.- 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.WXMNetworkDeviceBackendTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setGuestMAC
Initializes the value for theguestMACattribute.- Parameters:
guestMAC- The value for guestMAC- Returns:
thisbuilder for use in a chained invocation
-
setHostMAC
Initializes the value for thehostMACattribute.- Parameters:
hostMAC- The value for hostMAC- Returns:
thisbuilder for use in a chained invocation
-
addGroups
Adds one element togroupslist.- Parameters:
element- A groups element- Returns:
thisbuilder for use in a chained invocation
-
addGroups
Adds elements togroupslist.- Parameters:
elements- An array of groups elements- Returns:
thisbuilder for use in a chained invocation
-
setGroups
public final WXMTap.Builder setGroups(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)Sets or replaces all elements forgroupslist.- Parameters:
elements- An iterable of groups elements- Returns:
thisbuilder for use in a chained invocation
-
addAllGroups
public final WXMTap.Builder addAllGroups(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)Adds elements togroupslist.- Parameters:
elements- An iterable of groups elements- 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
-
build
Builds a newWXMTap.- Returns:
- An immutable instance of WXMTap
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-