Class TranslatorMode.Builder

  • Enclosing class:
    TranslatorMode

    public static class TranslatorMode.Builder
    extends Object
    Provides a translator mode builder.
    • Method Detail

      • withIdentifier

        public static TranslatorMode.Builder withIdentifier​(String identifier)
        Creates a new translator mode builder with the specified identifier.
        Parameters:
        identifier - the identifier
        Returns:
        a new builder
      • withType

        public static TranslatorMode.Builder withType​(TranslatorType type)
        Creates a new translator mode builder with the specified type.
        Parameters:
        type - the translator type
        Returns:
        a new builder
      • withGrade

        public static TranslatorMode.Builder withGrade​(double grade)
        Creates a new translator mode builder with the specified contraction grade.

        Note that setting the contraction grade implies that the translator type is contracted even though in some locales a particular contraction grade could have another meaning, for example that the braille is not contracted.

        Parameters:
        grade - the contraction grade
        Returns:
        a new builder
      • identifier

        public TranslatorMode.Builder identifier​(String value)
        Sets the identifier. If an identifier is not set, it will be generated from the supplied properties.
        Parameters:
        value - the identifier
        Returns:
        this instance
      • grade

        public TranslatorMode.Builder grade​(double grade)
        Sets the contraction grade.
        Parameters:
        grade - the contraction grade
        Returns:
        this instance
      • displayName

        public TranslatorMode.Builder displayName​(String value)
        Set the display name for this mode. The display name should be localized.
        Parameters:
        value - the display name
        Returns:
        this instance
      • description

        public TranslatorMode.Builder description​(String value)
        Set the description for this mode. The description should be localized.
        Parameters:
        value - the description
        Returns:
        this instance