@@ -44,14 +44,12 @@ public class Device {
4444 /**
4545 * The API's implemented by this device
4646 */
47- private final HashMap <Class <? extends DeviceAPI >, DeviceAPI > apis =
48- new HashMap <>();
47+ private final HashMap <Class <? extends DeviceAPI >, DeviceAPI > apis = new HashMap <>();
4948
5049 /**
5150 * Create a new instance
5251 *
53- * @param bus
54- * @param id
52+ * @param id the new id
5553 */
5654 public Device (String id ) {
5755 this .id = id ;
@@ -66,9 +64,9 @@ public final String getId() {
6664 }
6765
6866 /**
69- * Change the id of this device, only called by devicemanager
67+ * Change the id of this device, only called by device-manager
7068 *
71- * @param newId
69+ * @param newId the new id
7270 */
7371 final void setId (String newId ) {
7472 this .id = newId ;
@@ -86,8 +84,8 @@ public final boolean isStarted() {
8684 /**
8785 * Add an API implementation to the list of API's implemented by this device.
8886 *
89- * @param apiInterface
90- * @param apiImplementation
87+ * @param apiInterface the api interface
88+ * @param apiImplementation the api implementation
9189 */
9290 @ SuppressWarnings ({"unchecked" , "rawtypes" })
9391 public final <T extends DeviceAPI > void registerAPI (Class <T > apiInterface , T apiImplementation ) {
@@ -113,7 +111,7 @@ public final <T extends DeviceAPI> void registerAPI(Class<T> apiInterface, T api
113111 /**
114112 * Remove an API implementation from the list of API's implemented by this device.
115113 *
116- * @param apiInterface
114+ * @param apiInterface the api interface
117115 */
118116 public final void unregisterAPI (Class <? extends DeviceAPI > apiInterface ) {
119117 apis .remove (apiInterface );
@@ -122,11 +120,11 @@ public final void unregisterAPI(Class<? extends DeviceAPI> apiInterface) {
122120 /**
123121 * Does this device implement the given API?
124122 *
125- * @param apiInterface
123+ * @param apiInterface the api interface
126124 * @return boolean
127125 */
128126 public final boolean implementsAPI (Class <? extends DeviceAPI > apiInterface ) {
129- //lookup is classname based to handle multi isolate uscases
127+ // lookup is class name based to handle multi isolate use cases
130128 for (Class <?> clazz : apis .keySet ()) {
131129 if (clazz .getName ().equals (apiInterface .getName ())) {
132130 return true ;
@@ -147,12 +145,12 @@ public final Set<Class<? extends DeviceAPI>> implementedAPIs() {
147145 /**
148146 * Gets the implementation of a given API.
149147 *
150- * @param apiInterface
148+ * @param apiInterface the api interface
151149 * @return The api implementation (guaranteed not null)
152150 * @throws ApiNotFoundException The given api has not been found
153151 */
154152 public final <T extends DeviceAPI > T getAPI (Class <T > apiInterface ) throws ApiNotFoundException {
155- //lookup is classname based to handle multi isolate uscases
153+ // lookup is class name based to handle multi isolate use cases
156154 Class <?> apiInterface2 = null ;
157155 for (Class <?> clazz : apis .keySet ()) {
158156 if (clazz .getName ().equals (apiInterface .getName ())) {
@@ -169,7 +167,6 @@ public final <T extends DeviceAPI> T getAPI(Class<T> apiInterface) throws ApiNot
169167
170168 /**
171169 * @return The short description
172- * @see org.jnode.system.resource.ResourceOwner#getShortDescription()
173170 */
174171 public String getShortDescription () {
175172 return getId ();
0 commit comments