/* * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.mdsal.binding2.spec; import com.google.common.annotations.Beta; @Beta public abstract class TreeArgument { static TreeArgument root() { throw new UnsupportedOperationException(); } static > Item singular(Class implementedInterface) { throw new UnsupportedOperationException(); } TreeArgument() { // Intentionally package-visible & noop } public abstract Class getType(); @Override public int hashCode() { return getType().hashCode(); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final TreeArgument other = (TreeArgument) obj; return getType().equals(other.getType()); } }