Class PropertyTypeSelection.Builder

java.lang.Object
com.pnfsoftware.jeb.core.properties.impl.PropertyTypeSelection.Builder
Enclosing class:
PropertyTypeSelection

public static class PropertyTypeSelection.Builder extends Object
Builder used to define a selection property type.
  • Method Details

    • create

      public static PropertyTypeSelection.Builder create()
      Create a builder.
      Returns:
      a new builder
    • addDefaultEntry

      public PropertyTypeSelection.Builder addDefaultEntry(int id, String value, String description)
      Add an entry and mark it as the default selection.
      Parameters:
      id - stored integer identifier
      value - display value
      description - optional description
      Returns:
      this builder
    • addEntry

      public PropertyTypeSelection.Builder addEntry(int id, String value, String description)
      Add a selectable entry.
      Parameters:
      id - stored integer identifier
      value - display value
      description - optional description
      Returns:
      this builder
    • setDefault

      Set the default selection entry.
      Parameters:
      def - entry to use as the default selection
      Returns:
      this builder
    • setDefault

      public PropertyTypeSelection.Builder setDefault(int id)
      Set the default selection by identifier.
      Parameters:
      id - identifier of the default entry
      Returns:
      this builder
    • build

      public PropertyTypeSelection build()
      Build the selection property type.
      Returns:
      the property type