From 803778df57407260d829358c044af4c7dd970cdf Mon Sep 17 00:00:00 2001 From: jstaerk Date: Mon, 18 Nov 2024 19:23:07 +0100 Subject: [PATCH] updated javadocs --- .../src/main/java/org/mustangproject/Invoice.java | 12 +++++++----- .../src/main/java/org/mustangproject/XMLTools.java | 4 ++-- .../ZUGFeRD/ZUGFeRDInvoiceImporter.java | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/library/src/main/java/org/mustangproject/Invoice.java b/library/src/main/java/org/mustangproject/Invoice.java index db5f5b4a5..88e6cc53c 100644 --- a/library/src/main/java/org/mustangproject/Invoice.java +++ b/library/src/main/java/org/mustangproject/Invoice.java @@ -478,7 +478,9 @@ public BigDecimal getRoundingAmount() { } /*** - * for currency rounding differences to 5ct e.g. in Netherlands ("Rappenrundung") + * set the cent e.g. to reach the next 5ct mark for currencies in certain countries + * e.g. in the Netherlands ("Rappenrundung") + * @param amount * @return fluent setter */ public Invoice setRoundingAmount(BigDecimal amount) { @@ -543,8 +545,8 @@ public IZUGFeRDAllowanceCharge[] getZFAllowances() { /*** * this is wrong and only used from jackson - * @param iza - * @return + * @param iza the Array of allowances/charges + * @return fluent setter */ public Invoice setZFAllowances(Allowance[] iza) { Allowances=new ArrayList<>(); @@ -567,8 +569,8 @@ public IZUGFeRDAllowanceCharge[] getZFCharges() { /*** * this is wrong and only used from jackson - * @param iza - * @return + * @param iza the array of charges + * @return fluent setter */ public Invoice setZFCharges(Charge[] iza) { Charges=new ArrayList<>(); diff --git a/library/src/main/java/org/mustangproject/XMLTools.java b/library/src/main/java/org/mustangproject/XMLTools.java index dbccd4b07..d890c3d1c 100644 --- a/library/src/main/java/org/mustangproject/XMLTools.java +++ b/library/src/main/java/org/mustangproject/XMLTools.java @@ -92,7 +92,7 @@ public static BigDecimal tryBigDecimal(Node node) { /*** * formats a number so that at least minDecimals are displayed but at the maximum maxDecimals are there, i.e. * cuts potential 0s off the end until minDecimals - * @param value + * @param value the value to be formatted * @param maxDecimals number of maximal scale * @param minDecimals number of minimal scale * @return value as String with decimals in the specified range @@ -138,7 +138,7 @@ public static Date tryDate(String toParse) { } /*** - * relplaces some entities like < , > and & with their escaped pendant like < + * relplaces some entities like < , > and & with their escaped pendant like &lt; * @param s the string * @return the "safe" string */ diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java index 219f230ba..46594a26e 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java @@ -101,7 +101,7 @@ public void setInputStream(InputStream pdfStream) { /*** * return the file names of all files embedded into the PDF - * @see for XML embedded files please use ZUGFeRDInvoiceImporter.getFileAttachmentsXML + * @see ZUGFeRDInvoiceImporter for XML embedded files please use ZUGFeRDInvoiceImporter.getFileAttachmentsXML * @return a ArrayList of FileAttachments, empty if none */ public List getFileAttachmentsPDF() { @@ -228,7 +228,7 @@ private void extractFiles(Map names) throws * set the xml of a CII invoice * @param rawXML the xml string * @param doParse automatically parse input for zugferdImporter (not ZUGFeRDInvoiceImporter) - * @throws IOException + * @throws IOException if parsing xml throws it (unlikely its string based) */ public void setRawXML(byte[] rawXML, boolean doParse) throws IOException { this.containsMeta = true; @@ -248,7 +248,7 @@ public void setRawXML(byte[] rawXML, boolean doParse) throws IOException { /*** * set the xml of a CII invoice, simple version * @param rawXML the cii(?) as a string - * @throws IOException + * @throws IOException if parsing xml throws it (unlikely its string based) */ public void setRawXML(byte[] rawXML) throws IOException { setRawXML(rawXML, true);