@Override public void component(final Component component, final IVisit<Void> visit) { int levels = 0; for (Component current = component; current != null; current = current.getParent()) { levels++; } buffer.append(StringValue.repeat(levels, " ")) .append(component.getPageRelativePath()) .append(':') .append(Classes.simpleName(component.getClass())); } });
@Override public void component(final Component component, final IVisit<Void> visit) { int levels = 0; for (Component current = component; current != null; current = current.getParent()) { levels++; } buffer.append(StringValue.repeat(levels, " ")) .append(component.getPageRelativePath()) .append(':') .append(Classes.simpleName(component.getClass())); } });
public Object component(Component component) { int levels = 0; for (Component current = component; current != null; current = current.getParent()) { levels++; } buffer.append(StringValue.repeat(levels, " ") + component.getPageRelativePath() + ":" + Classes.simpleName(component.getClass())); return null; } });
/** * Converts the given input to an instance of StringValue. * * @param value * Double precision value * @param places * Number of places after decimal * @param locale * Locale to be used for formatting * @return String value formatted with the given number of places after decimal */ public static StringValue valueOf(final double value, final int places, final Locale locale) { if (Double.isNaN(value) || Double.isInfinite(value)) { return valueOf("N/A"); } else { final DecimalFormat format = new DecimalFormat("#." + repeat(places, '#'), new DecimalFormatSymbols(locale)); return valueOf(format.format(value)); } }
public Object component(Component component) { int levels = 0; for (Component current = component; current != null; current = current.getParent()) { levels++; } buffer.append(StringValue.repeat(levels, " ") + component.getPageRelativePath() + ":" + Classes.simpleName(component.getClass())); return null; } });
/** * Converts the given input to an instance of StringValue. * * @param value * Double precision value * @param places * Number of places after decimal * @param locale * Locale to be used for formatting * @return String value formatted with the given number of places after decimal */ public static StringValue valueOf(final double value, final int places, final Locale locale) { if (Double.isNaN(value) || Double.isInfinite(value)) { return valueOf("N/A"); } else { final DecimalFormat format = new DecimalFormat("#." + repeat(places, '#'), new DecimalFormatSymbols(locale)); return valueOf(format.format(value)); } }
/** * Converts the given input to an instance of StringValue. * * @param value * Double precision value * @param places * Number of places after decimal * @param locale * Locale to be used for formatting * @return String value formatted with the given number of places after decimal */ public static StringValue valueOf(final double value, final int places, final Locale locale) { if (Double.isNaN(value) || Double.isInfinite(value)) { return valueOf("N/A"); } else { final DecimalFormat format = new DecimalFormat("#." + repeat(places, '#'), new DecimalFormatSymbols(locale)); return valueOf(format.format(value)); } }