blob: b7359545edef092a63559006f1aa67d82d949def [file] [log] [blame]
Sho SHIMIZU7cd8a422014-08-27 16:05:21 -07001package net.onrc.onos.core.util;
2
3/**
4 * A generalized interface for ID generation
5 *
6 * {@link #getNewId()} generates a globally unique ID instance on
7 * each invocation.
8 *
9 * @param <T> the type of ID
10 */
11// TODO: do we need to define a base marker interface for ID,
12// then changed the type parameter to <T extends BaseId> something
13// like that?
14public interface IdGenerator<T> {
15 /**
16 * Returns a globally unique ID instance.
17 *
18 * @return globally unique ID instance
19 */
20 T getNewId();
21}