Package org.gnome.gio
Class InetAddress.Builder<B extends InetAddress.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.InetAddress.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
InetAddress
public static class InetAddress.Builder<B extends InetAddress.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theInetAddressobject.setBytes(MemorySegment bytes) The raw address data.setFamily(SocketFamily family) The address family (IPv4 or IPv6).setFlowinfo(int flowinfo) The flowinfo for an IPv6 address.setScopeId(int scopeId) The scope-id for an IPv6 address.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theInetAddressobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toInetAddress.- Overrides:
buildin classGObject.Builder<B extends InetAddress.Builder<B>>- Returns:
- a new instance of
InetAddresswith the properties that were set in the Builder object.
-
setBytes
The raw address data.- Parameters:
bytes- the value for thebytesproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setFamily
The address family (IPv4 or IPv6).- Parameters:
family- the value for thefamilyproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setFlowinfo
The flowinfo for an IPv6 address. SeeInetAddress.getFlowinfo().- Parameters:
flowinfo- the value for theflowinfoproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.86
-
setScopeId
The scope-id for an IPv6 address. SeeInetAddress.getScopeId().- Parameters:
scopeId- the value for thescope-idproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.86
-