idCounter.java 147 B

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