Java tutorial
/* * Copyright (c) 2013 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.bgpcep.programming.topology; import com.google.common.base.Preconditions; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.programming.rev131102.TopologyInstructionInput; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** * */ public final class TopologyProgrammingUtil { private TopologyProgrammingUtil() { throw new UnsupportedOperationException(); } @SuppressWarnings("unchecked") public static InstanceIdentifier<Topology> topologyForInput(final TopologyInstructionInput input) { Preconditions.checkNotNull(input.getNetworkTopologyRef()); return (InstanceIdentifier<Topology>) input.getNetworkTopologyRef().getValue(); } }