Accumulate Screenshot



Accumulate

Used to accumulate values by category. It might be usefulfor example in a billing program to accumulate hours byvarious categories. It could be used to count how many times various wordsoccurred in a document. All you need is: buckets.accumulate( "somecategory", someamount ); And Accumulate looks after creating the buckets toaccumulate new categories for you. e.g. Accumulate buckets = new Accumulate( 20 );buckets.accumulate( "ugli fruit", 3 );buckets.accumulate( "peaches", 10 );buckets.accumulate( "strawberries", 15 );buckets.accumulate( "peaches", 14 );String[] categories = buckets.categories(); // prints:// peaches:24// strawberries:15// ugli fruit:3for (String category: categories ) { System.out.println( category: + ":" + buckets.total( category )); } You can test the app with: java.exe com.mindprod.accumulate.Accumulate


Back to Accumulate Details page

New software of Software Development, Tools & Editors