< prev index next >

## src/com/sun/javatest/cof/ID.java

Print this page

    *** 31,47 ****

      class ID
      {
          static class Factory {
              ID create(String base) {
    !             Integer last = (Integer) (map.get(base));
                  int index = (last == null ? 0 : last.intValue() + 1);
                  map.put(base, new Integer(index));
                  return new ID(base, index);
              }

    !         Map map = new HashMap();
          };

          private ID(String base, int index) {
              this.base = base;
              this.index = index;
    --- 31,47 ----

      class ID
      {
          static class Factory {
              ID create(String base) {
    !             Integer last = map.get(base);
                  int index = (last == null ? 0 : last.intValue() + 1);
                  map.put(base, new Integer(index));
                  return new ID(base, index);
              }

    !         Map<String, Integer> map = new HashMap<>();
          };

          private ID(String base, int index) {
              this.base = base;
              this.index = index;

< prev index next >