class PdfNumber extends PdfObject implements Comparable<PdfNumber> {

    // CLASS VARIABLES

    /**
     * actual value of this <CODE>PdfNumber</CODE>, represented as a
     * <CODE>double</CODE>
     */
    private double value;

    // CONSTRUCTORS

    /**
     * Constructs a <CODE>PdfNumber</CODE>-object.
     *
     * @param content value of the new <CODE>PdfNumber</CODE>-object
     */
    public PdfNumber(String content) {
        super(NUMBER);
        try {
            value = Double.parseDouble(content.trim());
            setContent(content);
        } catch (NumberFormatException nfe) {
            throw new RuntimeException(
                    MessageLocalization.getComposedMessage("1.is.not.a.valid.number.2", content, nfe.toString()));
        }
    }

    /**
     * Constructs a new <CODE>PdfNumber</CODE>-object of type integer.
     *
     * @param value value of the new <CODE>PdfNumber</CODE>-object
     */
    public PdfNumber(int value) {
        super(NUMBER);
        this.value = value;
        setContent(String.valueOf(value));
    }

    /**
     * Constructs a new <CODE>PdfNumber</CODE>-object of type long.
     *
     * @param value value of the new <CODE>PdfNumber</CODE>-object
     */
    public PdfNumber(long value) {
        super(NUMBER);
        this.value = value;
        setContent(String.valueOf(value));
    }

    /**
     * Constructs a new <CODE>PdfNumber</CODE>-object of type real.
     *
     * @param value value of the new <CODE>PdfNumber</CODE>-object
     */
    public PdfNumber(double value) {
        super(NUMBER);
        this.value = value;
        setContent(ByteBuffer.formatDouble(value));
    }

    /**
     * Constructs a new <CODE>PdfNumber</CODE>-object of type real.
     *
     * @param value value of the new <CODE>PdfNumber</CODE>-object
     */
    public PdfNumber(float value) {
        this((double) value);
    }

    // methods returning the value of this object

    /**
     * Returns the primitive <CODE>int</CODE> value of this object.
     *
     * @return The value as <CODE>int</CODE>
     */
    public int intValue() {
        return (int) value;
    }

    /**
     * Returns the primitive <CODE>double</CODE> value of this object.
     *
     * @return The value as <CODE>double</CODE>
     */
    public double doubleValue() {
        return value;
    }

    /**
     * Returns the primitive <CODE>float</CODE> value of this object.
     *
     * @return The value as <CODE>float</CODE>
     */
    public float floatValue() {
        return (float) value;
    }

    // other methods

    /**
     * Increments the value of the <CODE>PdfNumber</CODE>-object by 1.
     */
    public void increment() {
        value += 1.0;
        setContent(ByteBuffer.formatDouble(value));
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PdfNumber)) {
            return false;
        }
        PdfNumber pdfNumber = (PdfNumber) o;
        return Double.compare(pdfNumber.value, value) == 0;
    }

    @Override
    public int hashCode() {
        return Objects.hash(value);
    }

    @Override
    public int compareTo(PdfNumber o) {<FILL_FUNCTION_BODY>}
}

        Objects.requireNonNull(o, "PdfNumber is null, can't be compared to current instance.");
        if (this == o) {
            return 0;
        }
        return Double.compare(o.value, value);
    
<methods>public boolean canBeInObjStm() ,public byte[] getBytes() ,public com.lowagie.text.pdf.PRIndirectReference getIndRef() ,public boolean isArray() ,public boolean isBoolean() ,public boolean isDictionary() ,public boolean isIndirect() ,public boolean isName() ,public boolean isNull() ,public boolean isNumber() ,public boolean isStream() ,public boolean isString() ,public int length() ,public void setIndRef(com.lowagie.text.pdf.PRIndirectReference) ,public void toPdf(com.lowagie.text.pdf.PdfWriter, java.io.OutputStream) throws java.io.IOException,public java.lang.String toString() ,public int type() <variables>public static final int ARRAY,public static final int BOOLEAN,public static final int DICTIONARY,public static final int INDIRECT,public static final int NAME,public static final java.lang.String NOTHING,public static final int NULL,public static final int NUMBER,public static final int STREAM,public static final int STRING,public static final java.lang.String TEXT_PDFDOCENCODING,public static final java.lang.String TEXT_UNICODE,protected byte[] bytes,protected com.lowagie.text.pdf.PRIndirectReference indRef,protected int type