class PDShadingType2 extends PDShading
{
    private COSArray coords = null;
    private COSArray domain = null;
    private COSArray extend = null;

    /**
     * Constructor using the given shading dictionary.
     *
     * @param shadingDictionary the dictionary for this shading
     */
    public PDShadingType2(COSDictionary shadingDictionary)
    {
        super(shadingDictionary);
    }

    @Override
    public int getShadingType()
    {
        return PDShading.SHADING_TYPE2;
    }

    /**
     * This will get the optional Extend values for this shading.
     *
     * @return the extend values
     */
    public COSArray getExtend()
    {
        if (extend == null)
        {
            extend = getCOSObject().getCOSArray(COSName.EXTEND);
        }
        return extend;
    }

    /**
     * Sets the optional Extend entry for this shading.
     *
     * @param newExtend the extend array
     */
    public void setExtend(COSArray newExtend)
    {
        extend = newExtend;
        getCOSObject().setItem(COSName.EXTEND, newExtend);
    }

    /**
     * This will get the optional Domain values for this shading.
     *
     * @return the domain values
     */
    public COSArray getDomain()
    {<FILL_FUNCTION_BODY>}

    /**
     * Sets the optional Domain entry for this shading.
     *
     * @param newDomain the domain array
     */
    public void setDomain(COSArray newDomain)
    {
        domain = newDomain;
        getCOSObject().setItem(COSName.DOMAIN, newDomain);
    }

    /**
     * This will get the Coords values for this shading.
     *
     * @return the coordinate values
     */
    public COSArray getCoords()
    {
        if (coords == null)
        {
            coords = getCOSObject().getCOSArray(COSName.COORDS);
        }
        return coords;
    }

    /**
     * Sets the Coords entry for this shading.
     *
     * @param newCoords the coordinates array
     */
    public void setCoords(COSArray newCoords)
    {
        coords = newCoords;
        getCOSObject().setItem(COSName.COORDS, newCoords);
    }

    @Override
    public Paint toPaint(Matrix matrix)
    {
        return new AxialShadingPaint(this, matrix);
    }
}

        if (domain == null)
        {
            domain = getCOSObject().getCOSArray(COSName.DOMAIN);
        }
        return domain;
    
<methods>public void <init>() ,public void <init>(org.apache.pdfbox.cos.COSDictionary) ,public static org.apache.pdfbox.pdmodel.graphics.shading.PDShading create(org.apache.pdfbox.cos.COSDictionary) throws java.io.IOException,public float[] evalFunction(float) throws java.io.IOException,public float[] evalFunction(float[]) throws java.io.IOException,public boolean getAntiAlias() ,public org.apache.pdfbox.pdmodel.common.PDRectangle getBBox() ,public org.apache.pdfbox.cos.COSArray getBackground() ,public java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform, org.apache.pdfbox.util.Matrix) throws java.io.IOException,public org.apache.pdfbox.cos.COSDictionary getCOSObject() ,public org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace getColorSpace() throws java.io.IOException,public org.apache.pdfbox.pdmodel.common.function.PDFunction getFunction() throws java.io.IOException,public abstract int getShadingType() ,public java.lang.String getType() ,public void setAntiAlias(boolean) ,public void setBBox(org.apache.pdfbox.pdmodel.common.PDRectangle) ,public void setBackground(org.apache.pdfbox.cos.COSArray) ,public void setColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace) ,public void setFunction(org.apache.pdfbox.pdmodel.common.function.PDFunction) ,public void setFunction(org.apache.pdfbox.cos.COSArray) ,public void setShadingType(int) ,public abstract java.awt.Paint toPaint(org.apache.pdfbox.util.Matrix) <variables>public static final int SHADING_TYPE1,public static final int SHADING_TYPE2,public static final int SHADING_TYPE3,public static final int SHADING_TYPE4,public static final int SHADING_TYPE5,public static final int SHADING_TYPE6,public static final int SHADING_TYPE7,private org.apache.pdfbox.pdmodel.common.PDRectangle bBox,private org.apache.pdfbox.cos.COSArray background,private org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace,private final non-sealed org.apache.pdfbox.cos.COSDictionary dictionary,private org.apache.pdfbox.pdmodel.common.function.PDFunction function,private org.apache.pdfbox.pdmodel.common.function.PDFunction[] functionArray