Updated API for collections

This commit is contained in:
Robinson 2023-08-04 23:31:44 -06:00
parent 2e904b8ac5
commit 16c8386ae1
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 3 additions and 3 deletions

View File

@ -268,7 +268,7 @@ internal class RemoteObjectStorage(val logger: KLogger) {
/**
* @return the ID registered for the specified object, or INVALID_RMI if not found.
*/
fun <T> getId(remoteObject: T): Int {
fun <T: Any> getId(remoteObject: T): Int {
// Find an ID with the object.
return objectMap.inverse()[remoteObject]
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2020 dorkbox, llc
* Copyright 2023 dorkbox, llc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -61,7 +61,7 @@ open class RmiObjectCache(logger: KLogger) {
/**
* @return the ID registered for the specified object, or INVALID_RMI if not found.
*/
internal fun <T> getId(implObject: T): Int {
internal fun <T: Any> getId(implObject: T): Int {
return implObjects.getId(implObject)
}
}