1 32 33 package com.jeantessier.classreader; 34 35 public class GroupData { 36 private String name; 37 private int size; 38 private int count; 39 40 public GroupData(String name, int size) { 41 this.name = name; 42 this.size = size; 43 44 this.count = 0; 45 } 46 47 public String getName() { 48 return name; 49 } 50 51 public int getSize() { 52 return size; 53 } 54 55 public int getCount() { 56 return count; 57 } 58 59 public void incrementCount() { 60 count++; 61 } 62 63 public String toString() { 64 StringBuffer result = new StringBuffer (); 65 66 result.append("Group \"" + getName() + "\" (" + getCount() + "/" + getSize() + ")"); 67 68 return result.toString(); 69 } 70 } 71 | Popular Tags |