Package com.e1c.langtool.query
Class MultiTranslationQuery
java.lang.Object
com.e1c.langtool.query.TranslationQuery
com.e1c.langtool.query.MultiTranslationQuery
- All Implemented Interfaces:
IMultiTranslationQuery
Encapsulates a translation query for multi texts.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IMultiTranslationQuerycreateQuery(List<String> texts, String source, String target) Creates a new translation query with processing for multi texts.static IMultiTranslationQuerycreateQuery(List<String> texts, String source, String target, boolean isProcessing) Creates a new translation query for multi texts.booleanReturns the code of source language of text.Returns the code of target language to translate.getTexts()Returns the texts to translate.inthashCode()booleanReturns true if the text (or texts) needs of processing.Methods inherited from class com.e1c.langtool.query.TranslationQuery
getSourceLanguage, getTargetLanguage, isProcessingNeeded
-
Method Details
-
createQuery
public static IMultiTranslationQuery createQuery(List<String> texts, String source, String target, boolean isProcessing) Creates a new translation query for multi texts.- Parameters:
text- the list of texts to translatesourceLocale- the source language of textstargetLocale- the target language to translateisProcessing- information text processing is needed or not- Returns:
- a new translation query for multi texts
-
createQuery
Creates a new translation query with processing for multi texts.- Parameters:
text- the list of texts to translatesourceLocale- the source language of textstargetLocale- the target language to translateisProcessing- information text processing is needed or not- Returns:
- a new translation query for multi texts
-
getTexts
Description copied from interface:IMultiTranslationQueryReturns the texts to translate.- Specified by:
getTextsin interfaceIMultiTranslationQuery- Returns:
- the list of texts to translate
-
hashCode
public int hashCode()- Overrides:
hashCodein classTranslationQuery
-
equals
- Overrides:
equalsin classTranslationQuery
-
getSourceLanguage
String getSourceLanguage()Returns the code of source language of text.- Returns:
- the code of source language. Can't be
null.
-
getTargetLanguage
String getTargetLanguage()Returns the code of target language to translate.- Returns:
- the code of target language to translate. Can't be
null.
-
isProcessingNeeded
boolean isProcessingNeeded()Returns true if the text (or texts) needs of processing.- Returns:
- true if the text (or texts) needs of processing
-