Update DeviceImpl

Change-Id: I85fc26c7e7c0fad315d1d9585f8c83ffb1d6e66a
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java
index e4efc4e..e3a3a39 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java
@@ -258,6 +258,13 @@
 	throw new ClassCastException("PortImpl expected, but found: " + p);
     }
 
+    private DeviceImpl getDeviceImpl(Device d) {
+	if (d instanceof DeviceImpl) {
+	    return (DeviceImpl) d;
+	}
+	throw new ClassCastException("DeviceImpl expected, but found: " + d);
+    }
+
     public boolean isSwitchInstanceInTopology(Switch sw) {
         // check if the sw instance is valid in Topology
         if (sw != switches.get(sw.getDpid())) {