@Test public void testPrint() throws IOException { LiteralToken token = new LiteralToken(" some text "); FastMoney amount = FastMoney.of(0,"USD"); StringBuilder sb = new StringBuilder(); token.print(sb, amount); assertEquals(sb.toString(), " some text "); }
@Override public void print(Appendable appendable, MonetaryAmount amount) throws IOException { appendable.append(this.token); }
LiteralToken implements FormatToken, Serializable { @Override public void print(Appendable appendable, MonetaryAmount amount) throws IOException { appendable.append(this.token); } }
LiteralToken implements FormatToken, Serializable { @Override public void print(Appendable appendable, MonetaryAmount amount) throws IOException { appendable.append(this.token); } LiteralToken(String token); }
LiteralToken implements FormatToken, Serializable { @Override public void print(Appendable appendable, MonetaryAmount amount) throws IOException { appendable.append(this.token); } LiteralToken(String token); @Override void parse(ParseContext context); @Override void print(Appendable appendable, MonetaryAmount amount); @Override String toString(); }
LiteralToken implements FormatToken, Serializable { @Override public void print(Appendable appendable, MonetaryAmount amount) throws IOException { appendable.append(this.token); } LiteralToken(String token); @Override void parse(ParseContext context); @Override void print(Appendable appendable, MonetaryAmount amount); @Override String toString();  }