Class NetworkAddress.Builder<B extends NetworkAddress.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
NetworkAddress

public static class NetworkAddress.Builder<B extends NetworkAddress.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public NetworkAddress build()
      Finish building the NetworkAddress object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to NetworkAddress.
      Overrides:
      build in class GObject.Builder<B extends NetworkAddress.Builder<B>>
      Returns:
      a new instance of NetworkAddress with the properties that were set in the Builder object.
    • setHostname

      public B setHostname(String hostname)
      Hostname to resolve.
      Parameters:
      hostname - the value for the hostname property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.22
    • setPort

      public B setPort(int port)
      Network port.
      Parameters:
      port - the value for the port property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.22
    • setScheme

      public B setScheme(String scheme)
      URI scheme.
      Parameters:
      scheme - the value for the scheme property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.22