2 * Copyright (c) 2014 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;
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.
15 * @param <P> Product type
16 * @deprecated This interface never reached its intended use and is scheduled for removal.
18 @Deprecated(since = "7.0.9", forRemoval = true)
19 public interface ProductAwareBuilder<P> extends Builder<P> {
21 * Return the hash code of the product. This has to be equivalent
22 * of calling {@link #build()}.{@link Object#hashCode()}.
24 * @return the hash code of the product.
26 int productHashCode();
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)}.
33 * @param product Product instance
34 * @return Return true if the product is equal to the would-be
35 * product of the builder.
37 boolean productEquals(Object product);