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.mdsal.binding.model.api;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.concepts.AbstractSimpleIdentifiable;
14 * It is used only as ancestor for other <code>Type</code>s. Note this forms the equality domain over most types, please
15 * consider joining the party.
18 public abstract class AbstractType extends AbstractSimpleIdentifiable<JavaTypeName> implements Type {
20 * Constructs the instance of this class with a JavaTypeName.
22 * @param identifier for this <code>Type</code>
24 protected AbstractType(final JavaTypeName identifier) {
29 public final int hashCode() {
30 return getIdentifier().hashCode();
34 public final boolean equals(final Object obj) {
35 return this == obj || obj instanceof Type && getIdentifier().equals(((Type) obj).getIdentifier());