We Recommend

Java How to Program Java How to Program
Takes a new tools-based approach to Web application development that uses Netbeans 5.5 and Java Studio Creator 2 to create and consume Web Services. Features new AJAX-enabled, Web applications built with JavaServer Faces (JSF), Java Studio Creator 2 and the Java Blueprints AJAX Components. Includes new topics throughout, such as JDBC 4, SwingWorker for multithreaded GUIs, GroupLayout, Java Desktop Integration Components (JDIC), and much more.


Posted By

ff1959 on 10/23/09


Tagged

java praxis


Versions (?)


Usage example of the convenience methods for toString()


Published in: Java 


  1. @Override
  2. public String toString()
  3. {
  4. List<java.util.Map<String,Object>> list = ClassUtils.getArrayList();
  5. list.add(Util.formatArg("size",getSize()));
  6. list.add(Util.formatArg("max",getMax()));
  7. list.add(Util.formatArg("min",getMin()));
  8. list.add(Util.formatArg("arithmetic mean",getArithmeticMean()));
  9. list.add(Util.formatArg("geometric mean",getGeometricMean()));
  10. list.add(Util.formatArg("standard deviation",getStandardDeviation()));
  11. list.add(Util.formatArg("variance",getVariance()));
  12. return Util.formatObjectToString(BasicNumericDataCollectorAction.class,list);
  13. }

Report this snippet 

You need to login to post a comment.