diff --git a/pi4j-core/src/main/java/com/pi4j/registry/impl/DefaultRuntimeRegistry.java b/pi4j-core/src/main/java/com/pi4j/registry/impl/DefaultRuntimeRegistry.java index 2d996372..8118741e 100644 --- a/pi4j-core/src/main/java/com/pi4j/registry/impl/DefaultRuntimeRegistry.java +++ b/pi4j-core/src/main/java/com/pi4j/registry/impl/DefaultRuntimeRegistry.java @@ -34,7 +34,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.Collections; +import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /** @@ -171,27 +173,6 @@ public synchronized boolean exists(int address) { return Collections.unmodifiableMap(this.instances); } - /** {@inheritDoc} */ - public synchronized boolean exists(String id, Class type){ - String _id = null; - try { - _id = validateId(id); - - // return 'false' if the requested ID is not found - if(!instances.containsKey(_id)) - return false; - - // get the I/O instance - IO instance = instances.get(id); - - // return true if the I/O instance matches the requested I/O type - return type.isAssignableFrom(instance.getClass()); - } catch (IOInvalidIDException e) { - return false; - } - } - - private String validateId(String id) throws IOInvalidIDException { if(id == null) throw new IOInvalidIDException();