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 java.io.Serializable;
13 * General identifier interface. It is primarily a marker for all things that identify concepts -- such as names,
14 * addresses, classes, etc. We do not require too much, just that the identifiers are serializable (and thus
17 * <p>Implementations are expected to implement {@link #hashCode()} and {@link #equals(Object)} methods in a way,
18 * which ensures that objects before and after serialization are considered equal.
20 * <p>Implementations are advised to use the {@link java.io.Externalizable} Proxy pattern to allow future evolution
21 * of their serialization format. For further efficiency, implementations should consider implementing
22 * {@link WritableObject}, so they can be efficiently embedded in other {@link Serializable} and {@code WritableObject}s
25 public interface Identifier extends Serializable, Immutable {
27 boolean equals(Object obj);