Class Paragraph.Builder

  • All Implemented Interfaces:
    ParagraphOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Paragraph

    public static final class Paragraph.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
    implements ParagraphOrBuilder
     Structural unit of text representing a number of words in certain order.
     
    Protobuf type google.cloud.vision.v1p2beta1.Paragraph
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • clear

        public Paragraph.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • getDefaultInstanceForType

        public Paragraph getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Paragraph build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Paragraph buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Paragraph.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • setField

        public Paragraph.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                          Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • clearField

        public Paragraph.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • clearOneof

        public Paragraph.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • setRepeatedField

        public Paragraph.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  int index,
                                                  Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • addRepeatedField

        public Paragraph.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • mergeFrom

        public Paragraph.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Paragraph.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • mergeFrom

        public Paragraph.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Paragraph.Builder>
        Throws:
        IOException
      • hasProperty

        public boolean hasProperty()
         Additional information detected for the paragraph.
         
        .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
        Specified by:
        hasProperty in interface ParagraphOrBuilder
        Returns:
        Whether the property field is set.
      • clearProperty

        public Paragraph.Builder clearProperty()
         Additional information detected for the paragraph.
         
        .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
      • getPropertyBuilder

        public TextAnnotation.TextProperty.Builder getPropertyBuilder()
         Additional information detected for the paragraph.
         
        .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
      • hasBoundingBox

        public boolean hasBoundingBox()
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
        Specified by:
        hasBoundingBox in interface ParagraphOrBuilder
        Returns:
        Whether the boundingBox field is set.
      • getBoundingBox

        public BoundingPoly getBoundingBox()
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
        Specified by:
        getBoundingBox in interface ParagraphOrBuilder
        Returns:
        The boundingBox.
      • setBoundingBox

        public Paragraph.Builder setBoundingBox​(BoundingPoly value)
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
      • setBoundingBox

        public Paragraph.Builder setBoundingBox​(BoundingPoly.Builder builderForValue)
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
      • mergeBoundingBox

        public Paragraph.Builder mergeBoundingBox​(BoundingPoly value)
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
      • clearBoundingBox

        public Paragraph.Builder clearBoundingBox()
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
      • getBoundingBoxBuilder

        public BoundingPoly.Builder getBoundingBoxBuilder()
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
      • getBoundingBoxOrBuilder

        public BoundingPolyOrBuilder getBoundingBoxOrBuilder()
         The bounding box for the paragraph.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertice order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
        Specified by:
        getBoundingBoxOrBuilder in interface ParagraphOrBuilder
      • getWordsList

        public List<Word> getWordsList()
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
        Specified by:
        getWordsList in interface ParagraphOrBuilder
      • getWordsCount

        public int getWordsCount()
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
        Specified by:
        getWordsCount in interface ParagraphOrBuilder
      • getWords

        public Word getWords​(int index)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
        Specified by:
        getWords in interface ParagraphOrBuilder
      • setWords

        public Paragraph.Builder setWords​(int index,
                                          Word value)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • setWords

        public Paragraph.Builder setWords​(int index,
                                          Word.Builder builderForValue)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addWords

        public Paragraph.Builder addWords​(Word value)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addWords

        public Paragraph.Builder addWords​(int index,
                                          Word value)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addWords

        public Paragraph.Builder addWords​(Word.Builder builderForValue)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addWords

        public Paragraph.Builder addWords​(int index,
                                          Word.Builder builderForValue)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addAllWords

        public Paragraph.Builder addAllWords​(Iterable<? extends Word> values)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • clearWords

        public Paragraph.Builder clearWords()
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • removeWords

        public Paragraph.Builder removeWords​(int index)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • getWordsBuilder

        public Word.Builder getWordsBuilder​(int index)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addWordsBuilder

        public Word.Builder addWordsBuilder()
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • addWordsBuilder

        public Word.Builder addWordsBuilder​(int index)
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • getWordsBuilderList

        public List<Word.Builder> getWordsBuilderList()
         List of words in this paragraph.
         
        repeated .google.cloud.vision.v1p2beta1.Word words = 3;
      • getConfidence

        public float getConfidence()
         Confidence of the OCR results for the paragraph. Range [0, 1].
         
        float confidence = 4;
        Specified by:
        getConfidence in interface ParagraphOrBuilder
        Returns:
        The confidence.
      • setConfidence

        public Paragraph.Builder setConfidence​(float value)
         Confidence of the OCR results for the paragraph. Range [0, 1].
         
        float confidence = 4;
        Parameters:
        value - The confidence to set.
        Returns:
        This builder for chaining.
      • clearConfidence

        public Paragraph.Builder clearConfidence()
         Confidence of the OCR results for the paragraph. Range [0, 1].
         
        float confidence = 4;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Paragraph.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
      • mergeUnknownFields

        public final Paragraph.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>