Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.intent; |
| 2 | //TODO is this the right package? |
| 3 | |
| 4 | /** |
| 5 | * A generalized interface for ID generation |
| 6 | * |
| 7 | * {@link #getNewId()} generates a globally unique ID instance on |
| 8 | * each invocation. |
| 9 | * |
| 10 | * @param <T> the type of ID |
| 11 | */ |
| 12 | // TODO: do we need to define a base marker interface for ID, |
| 13 | // then changed the type parameter to <T extends BaseId> something |
| 14 | // like that? |
| 15 | public interface IdGenerator<T> { |
| 16 | /** |
| 17 | * Returns a globally unique ID instance. |
| 18 | * |
| 19 | * @return globally unique ID instance |
| 20 | */ |
| 21 | T getNewId(); |
| 22 | } |