Class Attribute.Builder<T extends Attribute,B extends 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 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 offset
      endOffset - end character offset
    • Builder

      public Builder(Attribute toCopy)
      Constructs a builder by copying values from an existing object.
      Parameters:
      toCopy - the object to copy
  • Method Details

    • getThis

      protected abstract B getThis()
      Specified by:
      getThis in class BaseAttribute.Builder<Attribute,Attribute.Builder<T extends Attribute,B extends Attribute.Builder<T,B>>>
    • startOffset

      public B startOffset(int startOffset)
      Specifies the start character offset.
      Parameters:
      startOffset - the start character offset
      Returns:
      this
    • endOffset

      public B endOffset(int endOffset)
      Specifies the end character offset.
      Parameters:
      endOffset - the end offset
      Returns:
      this
    • setEndOffset

      @Deprecated public B setEndOffset(int endOffset)
      Deprecated.
      Specifies the end character offset.
      Parameters:
      endOffset - the end offset
      Returns:
      this