01: package experiments;
02:
03: import java.util.HashMap;
04: import java.util.Map;
05: import java.util.Map.Entry;
06:
07: /**
08: * Class for testing LVTT bug.
09: *
10: * @author Tin Pavlinic
11: * @version $Revision 1.0 $
12: */
13: public class LVTT {
14: public int countEntries() {
15: final Map<Character, String> map = new HashMap<Character, String>();
16:
17: for (char c = 'a'; c < 'z'; c++) {
18: map.put(c, "" + (char) (c + 1));
19: }
20: map.put('z', "a");
21:
22: StringBuffer buf = new StringBuffer();
23: for (Entry<Character, String> e : map.entrySet()) {
24: buf.append(e.getValue());
25: }
26: return buf.length();
27: }
28: }
|