Package com.basistech.rosette.dm
Class LanguageDetection.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<Attribute,Attribute.Builder<T,B>>
com.basistech.rosette.dm.Attribute.Builder<LanguageDetection,LanguageDetection.Builder>
com.basistech.rosette.dm.LanguageDetection.Builder
- Enclosing class:
- LanguageDetection
public static class LanguageDetection.Builder
extends Attribute.Builder<LanguageDetection,LanguageDetection.Builder>
A builder for language detection results.
-
Field Summary
Fields inherited from class com.basistech.rosette.dm.Attribute.Builder
endOffset, startOffset
-
Constructor Summary
ConstructorDescriptionBuilder
(int startOffset, int endOffset, List<LanguageDetection.DetectionResult> detectionResults) Constructs a builder from the required properties.Builder
(LanguageDetection toCopy) Constructs a builder by copying the values from an existing language detection. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs an immutable language detection result from the current state of the builder.protected LanguageDetection.Builder
getThis()
Methods inherited from class com.basistech.rosette.dm.Attribute.Builder
endOffset, setEndOffset, startOffset
Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
public Builder(int startOffset, int endOffset, List<LanguageDetection.DetectionResult> detectionResults) Constructs a builder from the required properties.- Parameters:
startOffset
- the start offset of the region in charactersendOffset
- the end offset of the region in charactersdetectionResults
- the list of detection results
-
Builder
Constructs a builder by copying the values from an existing language detection.- Parameters:
toCopy
- the object to copy
-
-
Method Details
-
build
Constructs an immutable language detection result from the current state of the builder.- Returns:
- the new language detection
-
getThis
- Specified by:
getThis
in classAttribute.Builder<LanguageDetection,
LanguageDetection.Builder>
-