com.mindee.parsing.standard.Taxes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mindee-api-java Show documentation
Show all versions of mindee-api-java Show documentation
Java Library to call Mindee's Off-The-Shelf and Custom APIs
package com.mindee.parsing.standard;
import com.mindee.parsing.SummaryHelper;
import java.util.ArrayList;
/**
* Represent all the tax lines.
*/
public class Taxes extends ArrayList {
/**
* Default string representation.
*/
public String toString() {
if (this.isEmpty()) {
return "";
}
int[] columnSizes = new int[] {15, 8, 10, 15};
return String.format("%n%s%n", SummaryHelper.lineSeparator(columnSizes, "-"))
+ " | Base | Code | Rate (%) | Amount |"
+ String.format("%n%s%n ", SummaryHelper.lineSeparator(columnSizes, "="))
+ SummaryHelper.arrayToString(this, columnSizes)
+ String.format("%n%s", SummaryHelper.lineSeparator(columnSizes, "-"));
}
}