IdCounter.java 146 B

123456789
  1. package ui.model;
  2. public class IdCounter {
  3. private static int counter = 0;
  4. public static synchronized int nextId() {
  5. return ++counter;
  6. }
  7. }