/*
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.yangtools.concepts;

import java.io.Serializable;

/**
 * General identifier interface. It is primarily a marker for all things that
 * identify concepts -- such as names, addresses, classes, etc. We do not
 * require too much, just that the identifiers are serializable (and this
 * transferable).
 *
 * Implementations are expected to implement hashCode() and equals() methods
 * in a way, which ensures that objects before and after serialization are
 * considered equal.
 *
 * Implementations are advised to use the Externalizable Proxy pattern to
 * allow future evolution of their serialization format.
 */
public interface Identifier extends Serializable, Immutable {
    @Override
    boolean equals(Object o);

    @Override
    int hashCode();

    @Override
    String toString();
}


@@ -375,16 +375,63 @@
 lizable;
+%0Aimport javax.annotation.concurrent.ThreadSafe;
 %0A%0A/**%0A *
@@ -505,19 +505,16 @@
 ngs that
-%0A *
  identif
@@ -541,16 +541,19 @@
 s names,
+%0A *
  address
@@ -579,19 +579,16 @@
 e do not
-%0A *
  require
@@ -717,16 +717,24 @@
 plement 
+%7B@link #
 hashCode
@@ -739,29 +739,45 @@
 de()
+%7D
  and 
-equals()
+%7B@link #equals(Object)%7D
  methods
 %0A * 
@@ -772,19 +772,16 @@
  methods
-%0A *
  in a wa
@@ -788,16 +788,19 @@
 y, which
+%0A *
  ensures
@@ -847,19 +847,16 @@
 tion are
-%0A *
  conside
@@ -911,16 +911,31 @@
 use the 
+%7B@link java.io.
 External
@@ -940,16 +940,17 @@
 alizable
+%7D
  Proxy p
@@ -958,19 +958,16 @@
 ttern to
-%0A *
  allow f
@@ -981,16 +981,19 @@
 volution
+%0A *
  of thei
@@ -1015,20 +1015,311 @@
  format.
-%0A */
+ For further efficiency, implementation should implement %7B@link WritableObject%7D,%0A * so they can be efficiently embedded in other %7B@link Serializable%7D objects.%0A *%0A * Note that this class is annotated as %7B@link ThreadSafe%7D, hence all implementations are expected to be thread-safe.%0A */%0A@ThreadSafe
 %0Apublic 

Annotate Identifier with @ThreadSafe