class PDAnnotationPolyline extends PDAnnotationMarkup
{
    /**
     * The type of annotation.
     */
    public static final String SUB_TYPE = "PolyLine";

    private PDAppearanceHandler customAppearanceHandler;
    
    /**
     * Constructor.
     */
    public PDAnnotationPolyline()
    {
        getCOSObject().setName(COSName.SUBTYPE, SUB_TYPE);
    }

    /**
     * Constructor.
     *
     * @param dict The annotations dictionary.
     */
    public PDAnnotationPolyline(COSDictionary dict)
    {
        super(dict);
    }

    /**
     * This will set the line ending style for the start point, see the LE_ constants for the possible values.
     *
     * @param style The new style.
     */
    public void setStartPointEndingStyle(String style)
    {<FILL_FUNCTION_BODY>}

    /**
     * This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.
     *
     * @return The ending style for the start point, LE_NONE if missing, never null.
     */
    public String getStartPointEndingStyle()
    {
        COSArray array = getCOSObject().getCOSArray(COSName.LE);
        if (array != null && array.size() >= 2)
        {
            return array.getName(0, PDAnnotationLine.LE_NONE);
        }
        return PDAnnotationLine.LE_NONE;
    }

    /**
     * This will set the line ending style for the end point, see the LE_ constants for the possible values.
     *
     * @param style The new style.
     */
    public void setEndPointEndingStyle(String style)
    {
        String actualStyle = style == null ? PDAnnotationLine.LE_NONE : style;
        COSArray array = getCOSObject().getCOSArray(COSName.LE);
        if (array == null || array.size() < 2)
        {
            array = new COSArray();
            array.add(COSName.getPDFName(PDAnnotationLine.LE_NONE));
            array.add(COSName.getPDFName(actualStyle));
            getCOSObject().setItem(COSName.LE, array);
        }
        else
        {
            array.setName(1, actualStyle);
        }
    }

    /**
     * This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.
     *
     * @return The ending style for the end point, LE_NONE if missing, never null.
     */
    public String getEndPointEndingStyle()
    {
        COSArray array = getCOSObject().getCOSArray(COSName.LE);
        if (array != null && array.size() >= 2)
        {
            return array.getName(1, PDAnnotationLine.LE_NONE);
        }
        return PDAnnotationLine.LE_NONE;
    }

    /**
     * This will set interior color of the line endings defined in the LE entry.
     *
     * @param ic color.
     */
    public void setInteriorColor(PDColor ic)
    {
        getCOSObject().setItem(COSName.IC, ic.toCOSArray());
    }

    /**
     * This will retrieve the interior color with which to fill the annotation’s line endings.
     *
     * @return object representing the color.
     */
    public PDColor getInteriorColor()
    {
        return getColor(COSName.IC);
    }

    /**
     * This will retrieve the numbers that shall represent the alternating horizontal and vertical
     * coordinates.
     *
     * @return An array of floats representing the alternating horizontal and vertical coordinates.
     */
    public float[] getVertices()
    {
        COSArray vertices = getCOSObject().getCOSArray(COSName.VERTICES);
        return vertices != null ? vertices.toFloatArray() : null;
    }

    /**
     * This will set the numbers that shall represent the alternating horizontal and vertical
     * coordinates.
     *
     * @param points an array with the numbers that shall represent the alternating horizontal and
     * vertical coordinates.
     */
    public void setVertices(float[] points)
    {
        getCOSObject().setItem(COSName.VERTICES, COSArray.of(points));
    }

    /**
     * Set a custom appearance handler for generating the annotations appearance streams.
     * 
     * @param appearanceHandler custom appearance handler
     */
    public void setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)
    {
        customAppearanceHandler = appearanceHandler;
    }

    @Override
    public void constructAppearances()
    {
        this.constructAppearances(null);
    }

    @Override
    public void constructAppearances(PDDocument document)
    {
        if (customAppearanceHandler == null)
        {
            PDPolylineAppearanceHandler appearanceHandler = new PDPolylineAppearanceHandler(this, document);
            appearanceHandler.generateAppearanceStreams();
        }
        else
        {
            customAppearanceHandler.generateAppearanceStreams();
        }
    }
}

        String actualStyle = style == null ? PDAnnotationLine.LE_NONE : style;
        COSArray array = getCOSObject().getCOSArray(COSName.LE);
        if (array == null || array.isEmpty())
        {
            array = new COSArray();
            array.add(COSName.getPDFName(actualStyle));
            array.add(COSName.getPDFName(PDAnnotationLine.LE_NONE));
            getCOSObject().setItem(COSName.LE, array);
        }
        else
        {
            array.setName(0, actualStyle);
        }
    
<methods>public void <init>() ,public void <init>(org.apache.pdfbox.cos.COSDictionary) ,public org.apache.pdfbox.pdmodel.interactive.annotation.PDBorderStyleDictionary getBorderStyle() ,public float getConstantOpacity() ,public java.util.Calendar getCreationDate() ,public org.apache.pdfbox.pdmodel.interactive.annotation.PDExternalDataDictionary getExternalData() ,public org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation getInReplyTo() throws java.io.IOException,public java.lang.String getIntent() ,public org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationPopup getPopup() ,public java.lang.String getReplyType() ,public java.lang.String getRichContents() ,public java.lang.String getSubject() ,public java.lang.String getTitlePopup() ,public void setBorderStyle(org.apache.pdfbox.pdmodel.interactive.annotation.PDBorderStyleDictionary) ,public void setConstantOpacity(float) ,public void setCreationDate(java.util.Calendar) ,public void setExternalData(org.apache.pdfbox.pdmodel.interactive.annotation.PDExternalDataDictionary) ,public void setInReplyTo(org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation) ,public void setIntent(java.lang.String) ,public void setPopup(org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationPopup) ,public void setReplyType(java.lang.String) ,public void setRichContents(java.lang.String) ,public void setSubject(java.lang.String) ,public void setTitlePopup(java.lang.String) <variables>public static final java.lang.String RT_GROUP,public static final java.lang.String RT_REPLY