
1 changed files with 5 additions and 4 deletions
@ -1,11 +1,12 @@ |
|||||
package foundation.pEp.jniadapter; |
package foundation.pEp.jniadapter; |
||||
import java.util.concurrent.atomic.AtomicLong; |
import java.util.concurrent.atomic.AtomicLong; |
||||
|
|
||||
abstract class UniquelyIdentifiable { |
// Abstract here so you can only inherit from, but not instantiate
|
||||
static final AtomicLong NEXT_ID = new AtomicLong(1); |
abstract public class UniquelyIdentifiable { |
||||
final long id = NEXT_ID.getAndIncrement(); |
private static final AtomicLong NEXT_ID = new AtomicLong(1); |
||||
|
private final long id = NEXT_ID.getAndIncrement(); |
||||
|
|
||||
public long getId() { |
protected long getId() { |
||||
return id; |
return id; |
||||
} |
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue