/** * 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 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 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 integer. * * @param value value of the new <CODE>PdfNumber</CODE>-object */ public PdfNumber(int value) { super(NUMBER); this.value = value; setContent(String.valueOf(value)); }
/** * Increments the value of the <CODE>PdfNumber</CODE>-object by 1. */ public void increment() { value += 1.0; 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(double value) { super(NUMBER); this.value = value; setContent(ByteBuffer.formatDouble(value)); }
/** * Increments the value of the <CODE>PdfNumber</CODE>-object by 1. */ public void increment() { value += 1.0; 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(double value) { super(NUMBER); this.value = value; setContent(ByteBuffer.formatDouble(value)); }
/** * 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 <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())); } }