Class PensieveUtil


  • public final class PensieveUtil
    extends Object
    A helper class
    • Method Detail

      • convertToTranslationUnit

        public static TranslationUnit convertToTranslationUnit​(LocaleId sourceLoc,
                                                               LocaleId targetLoc,
                                                               ITextUnit textUnit)
        Converts an un-segmented TextUnit into a TranslationUnit. The target may not exist, in that case its content is stored as a null.
        Parameters:
        sourceLoc - the source locale to transform.
        targetLoc - the target locale to transform.
        textUnit - the text unit to convert.
        Returns:
        a TranslationUnit that represents the TextUnit
      • convertToTextUnit

        public static ITextUnit convertToTextUnit​(TranslationUnit tu)
        Converts a TranslationUnit to a TextUnit
        Parameters:
        tu - The TranslationUnit to convert.
        Returns:
        The converted TextUnit