Class BaseTranslationProvider.TranslationResult
- All Implemented Interfaces:
IPageIterable<IPage<IProjectTranslation>>,IHistoryTranslationProvider.ITranslationResult,Iterable<IPage<IProjectTranslation>>
- Enclosing class:
- BaseTranslationProvider
-
Constructor Summary
ConstructorsConstructorDescriptionTranslationResult(IProjectTranslationStorage translationService, IExpression query, long totalSize, String value) -
Method Summary
Modifier and TypeMethodDescriptioniterator()Returns an iterator over of pages that contain translations.iterator(int pageSize) Returns an iterator over of pages that contain translations with the specified page size.longReturns the total count of translation which have been found for the query.value()The result of translation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TranslationResult
public TranslationResult(IProjectTranslationStorage translationService, IExpression query, long totalSize, String value)
-
-
Method Details
-
iterator
Description copied from interface:IHistoryTranslationProvider.ITranslationResultReturns an iterator over of pages that contain translations with the specified page size.This method returns an iterator that allows to iterate over pages with translations in lazy way. Unlike
IHistoryTranslationProvider.ITranslationResult.iterator()this method allows users to specify the size of iterable pages.Note that implementators of this interface may realize the lazy way of page loading through iterating so it's recommended avoiding a redundant passes over iterator because of overhead for creating the iterator and loading pages.
- Specified by:
iteratorin interfaceIHistoryTranslationProvider.ITranslationResult- Specified by:
iteratorin interfaceIPageIterable<IPage<IProjectTranslation>>- Parameters:
pageSize- the size of iterable pages- Returns:
- an iterator of pages (must be positive)
- See Also:
-
iterator
Description copied from interface:IHistoryTranslationProvider.ITranslationResultReturns an iterator over of pages that contain translations.This method returns an iterator that allows to iterate over pages with translations in lazy way. The page size is defined by implementators of this interface. To define the size of iterating pages use the
IHistoryTranslationProvider.ITranslationResult.iterator(int)method.Note that implementators of this interface may realize the lazy way of page loading through iterating so it's recommended avoiding a redundant passes over iterator because of overhead for creating the iterator and loading pages.
- Specified by:
iteratorin interfaceIHistoryTranslationProvider.ITranslationResult- Specified by:
iteratorin interfaceIterable<IPage<IProjectTranslation>>- Returns:
- an iterator of pages
- See Also:
-
totalCount
public long totalCount()Description copied from interface:IHistoryTranslationProvider.ITranslationResultReturns the total count of translation which have been found for the query.- Specified by:
totalCountin interfaceIHistoryTranslationProvider.ITranslationResult- Returns:
- the total count of translation (must be positive)
-
value
Description copied from interface:IHistoryTranslationProvider.ITranslationResultThe result of translation.The implementors of this interface must provide that the result of translation returned from this method must be the same with all translations contained in iterable pages returned from iterators (see
IHistoryTranslationProvider.ITranslationResult.iterator()andIHistoryTranslationProvider.ITranslationResult.iterator(int)methods).- Specified by:
valuein interfaceIHistoryTranslationProvider.ITranslationResult- Returns:
- the translation result (must not be
null)
-