Usage example of the convenience methods for toString()


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.