Class TranslatorMode

  • All Implemented Interfaces:
    FactoryProperties

    public final class TranslatorMode
    extends Object
    implements FactoryProperties
    Provides information about a translator mode. This information could, for example, be used to find a translator that matches a given specification. The specification could be based on some translator mode properties or on its identifier.
    • Method Detail

      • withType

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

        public static TranslatorMode withGrade​(double grade)
        Creates a new mode with the specified translation grade
        Parameters:
        grade - the translation grade
        Returns:
        a new instance
      • getContractionGrade

        public Optional<Double> getContractionGrade()
        Gets the contraction grade, if set.
        Returns:
        the contraction grade.