Deprecate ProductAwareBuilder
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / ProductAwareBuilder.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.concepts;
9
10 /**
11  * An extension of the {@link Builder} concept which allows an implementation
12  * of this interface to be used in collections instead of the product. Given
13  * the mutable nature of Builders, this has to be done very carefully.
14  *
15  * @param <P> Product type
16  * @deprecated This interface never reached its intended use and is scheduled for removal.
17  */
18 @Deprecated(since = "7.0.9", forRemoval = true)
19 public interface ProductAwareBuilder<P> extends Builder<P> {
20     /**
21      * Return the hash code of the product. This has to be equivalent
22      * of calling {@link #build()}.{@link Object#hashCode()}.
23      *
24      * @return the hash code of the product.
25      */
26     int productHashCode();
27
28     /**
29      * Check whether an instance of the product that would be created
30      * by the builder is equal to an existing instance. This has to
31      * be equivalent of calling {@link #build()}.{@link Object#equals(Object)}.
32      *
33      * @param product Product instance
34      * @return Return true if the product is equal to the would-be
35      *         product of the builder.
36      */
37     boolean productEquals(Object product);
38 }