2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.concepts;
10 import org.eclipse.jdt.annotation.NonNull;
13 * A generalized contract of an object which has an identifier. The identifier, unlike the object carrying it, must
14 * generally comply to the interface contract outlined in {@link Identifier}, but this is not enforced in this API's
15 * design, as there are external classes, such as {@link String}, which comply to the contract without implementing it.
17 * @param <T> Identifier class, must conform to API contract outlined by {@link Identifier}, even if it does not
20 public interface Identifiable<T> {
22 * Return this objects Identifier.
24 * @return Object's identifier, must not be null.
26 @NonNull T getIdentifier();