2 * Copyright (c) 2017 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
9 package org.opendaylight.mdsal.binding.javav2.spec.base;
11 import com.google.common.annotations.Beta;
12 import org.opendaylight.mdsal.binding.javav2.spec.structural.TreeChildNode;
15 public abstract class TreeArgument<T> {
17 static TreeArgument<TreeRoot> root() {
18 throw new UnsupportedOperationException();
21 static <T extends TreeChildNode<?, ?>> Item<T> singular(Class<T> implementedInterface) {
22 throw new UnsupportedOperationException();
26 // Intentionally package-visible & noop
29 public abstract Class<T> getType();
32 public int hashCode() {
33 return getType().hashCode();
37 public boolean equals(final Object obj) {
44 if (getClass() != obj.getClass()) {
47 final TreeArgument<?> other = (TreeArgument<?>) obj;
48 return getType().equals(other.getType());