class SetColor extends OperatorProcessor
{
    protected SetColor(PDFStreamEngine context)
    {
        super(context);
    }

    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {<FILL_FUNCTION_BODY>}

    /**
     * Returns either the stroking or non-stroking color value.
     * @return The stroking or non-stroking color value.
     */
    protected abstract PDColor getColor();

    /**
     * Sets either the stroking or non-stroking color value.
     * @param color The stroking or non-stroking color value.
     */
    protected abstract void setColor(PDColor color);

    /**
     * Returns either the stroking or non-stroking color space.
     * @return The stroking or non-stroking color space.
     */
    protected abstract PDColorSpace getColorSpace();
}

        PDColorSpace colorSpace = getColorSpace();
        if (!(colorSpace instanceof PDPattern))
        {
            if (arguments.size() < colorSpace.getNumberOfComponents())
            {
                throw new MissingOperandException(operator, arguments);
            }
            if (!checkArrayTypesClass(arguments, COSNumber.class))
            {
                return;
            }
        }
        COSArray array = new COSArray(arguments);
        setColor(new PDColor(array, colorSpace));
    
<methods>public boolean checkArrayTypesClass(List<org.apache.pdfbox.cos.COSBase>, Class<?>) ,public abstract java.lang.String getName() ,public abstract void process(org.apache.pdfbox.contentstream.operator.Operator, List<org.apache.pdfbox.cos.COSBase>) throws java.io.IOException<variables>private final non-sealed org.apache.pdfbox.contentstream.PDFStreamEngine context