Package com.basistech.rosette.dm
Class Attribute.Builder<T extends Attribute,B extends Attribute.Builder<T,B>>
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<Attribute,Attribute.Builder<T,B>>
com.basistech.rosette.dm.Attribute.Builder<T,B>
- Direct Known Subclasses:
BaseNounPhrase.Builder,EntityMention.Builder,Extent.Builder,LanguageDetection.Builder,LayoutRegion.Builder,Mention.Builder,RelationshipMention.Builder,ResolvedEntity.Builder,ScriptRegion.Builder,Sentence.Builder,Token.Builder
- Enclosing class:
- Attribute
public abstract static class Attribute.Builder<T extends Attribute,B extends Attribute.Builder<T,B>>
extends BaseAttribute.Builder<Attribute,Attribute.Builder<T,B>>
Base class for builders for attributes that inherit from
Attribute.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionendOffset(int endOffset) Specifies the end character offset.protected abstract BgetThis()setEndOffset(int endOffset) Deprecated.startOffset(int startOffset) Specifies the start character offset.Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Field Details
-
startOffset
protected int startOffset -
endOffset
protected int endOffset
-
-
Constructor Details
-
Builder
public Builder(int startOffset, int endOffset) Constructs a builder with offsets.- Parameters:
startOffset- start characters offsetendOffset- end character offset
-
Builder
Constructs a builder by copying values from an existing object.- Parameters:
toCopy- the object to copy
-
-
Method Details
-
getThis
- Specified by:
getThisin classBaseAttribute.Builder<Attribute,Attribute.Builder<T extends Attribute, B extends Attribute.Builder<T, B>>>
-
startOffset
Specifies the start character offset.- Parameters:
startOffset- the start character offset- Returns:
- this
-
endOffset
Specifies the end character offset.- Parameters:
endOffset- the end offset- Returns:
- this
-
setEndOffset
Deprecated.useendOffset(int)Specifies the end character offset.- Parameters:
endOffset- the end offset- Returns:
- this
-
endOffset(int)