Class DeviceTool.Builder<B extends DeviceTool.Builder<B>>

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

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

      public B setAxes(Set<AxisFlags> axes)
      The axes of the tool.
      Parameters:
      axes - the value for the axes property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHardwareId

      public B setHardwareId(long hardwareId)
      The hardware ID of the tool.
      Parameters:
      hardwareId - the value for the hardware-id property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSerial

      public B setSerial(long serial)
      The serial number of the tool.
      Parameters:
      serial - the value for the serial property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setToolType

      public B setToolType(DeviceToolType toolType)
      The type of the tool.
      Parameters:
      toolType - the value for the tool-type property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setAxes

      public B setAxes(AxisFlags... axes)
      The axes of the tool.
      Parameters:
      axes - the value for the axes property
      Returns:
      the Builder instance is returned, to allow method chaining