
org.dspace.app.statistics.ReportTools Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dspace-api Show documentation
Show all versions of dspace-api Show documentation
DSpace core data model and service APIs.
The newest version!
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.statistics;
import java.text.NumberFormat;
/**
* This class provides a number of tools that may be useful to the methods
* which generate the different types of report
*
* @author Richard Jones
*/
public class ReportTools {
/**
* Default constructor
*/
private ReportTools() { }
/**
* method to take the given integer and produce a string to be used in
* the display of the report. Basically provides an interface for a
* standard NumberFormat class, but without the hassle of instantiating
* and localising it.
*
* @param number the integer to be formatted
* @return a string containing the formatted number
*/
public static String numberFormat(int number) {
NumberFormat nf = NumberFormat.getIntegerInstance();
return nf.format((double) number);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy