Package org.gnome.gio
Class InetAddress.Builder<B extends InetAddress.Builder<B>>
java.lang.Object
io.github.jwharm.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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theInetAddress
object.setBytes
(MemorySegment bytes) The raw address data.setFamily
(SocketFamily family) The address family (IPv4 or IPv6).Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theInetAddress
object. 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:
build
in classGObject.Builder<B extends InetAddress.Builder<B>>
- Returns:
- a new instance of
InetAddress
with the properties that were set in the Builder object.
-
setBytes
The raw address data.- Parameters:
bytes
- the value for thebytes
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFamily
The address family (IPv4 or IPv6).- Parameters:
family
- the value for thefamily
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-