@@ -0,0 +1,1285 @@
+/*%0A * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.%0A *%0A * This program and the accompanying materials are made available under the%0A * terms of the Eclipse Public License v1.0 which accompanies this distribution,%0A * and is available at http://www.eclipse.org/legal/epl-v10.html%0A */%0Apackage org.opendaylight.yangtools.concepts;%0A%0A/**%0A * An extension of the %7B@link Builder%7D concept which allows an implementation%0A * of this interface to be used in collections instead of the product. Given%0A * the mutable nature of Builders, this has to be done very carefully.%0A *%0A * @param %3CP%3E Product type%0A */%0Apublic interface ProductAwareBuilder%3CP%3E extends Builder%3CP%3E %7B%0A%09/**%0A%09 * Return the hash code of the product. This has to be equivalent%0A%09 * of calling %7B@link #toInstance()%7D.%7B@link #hashCode()%7D.%0A%09 *%0A%09 * @return the hash code of the product.%0A%09 */%0A%09int productHashCode();%0A%0A%09/**%0A%09 * Check whether an instance of the product that would be created%0A%09 * by the builder is equal to an existing instance. This has to%0A%09 * be equivalent of calling %7B@link #toInstance()%7D.%7B@link #equals(Object)%7D.%0A%09 *%0A%09 * @param product Product instance%0A%09 * @return Return true if the product is equal to the would-be%0A%09 *         product of the builder.%0A%09 */%0A%09boolean productEquals(Object product);%0A%7D%0A

Introduce the concept of ProductAwareBuilder