001package org.cpsolver.ifs.util; 002 003/** 004 * ID generator. 005 * 006 * @version IFS 1.3 (Iterative Forward Search)<br> 007 * Copyright (C) 2006 - 2014 Tomáš Müller<br> 008 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br> 009 * <a href="http://muller.unitime.org">http://muller.unitime.org</a><br> 010 * <br> 011 * This library is free software; you can redistribute it and/or modify 012 * it under the terms of the GNU Lesser General Public License as 013 * published by the Free Software Foundation; either version 3 of the 014 * License, or (at your option) any later version. <br> 015 * <br> 016 * This library is distributed in the hope that it will be useful, but 017 * WITHOUT ANY WARRANTY; without even the implied warranty of 018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 019 * Lesser General Public License for more details. <br> 020 * <br> 021 * You should have received a copy of the GNU Lesser General Public 022 * License along with this library; if not see 023 * <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>. 024 */ 025public class IdGenerator { 026 private int iLastId = 0; 027 028 /** Generates new id 029 * @return new unique id 030 **/ 031 public long newId() { 032 return ++iLastId; 033 } 034 035}