I see the LinkedHashMap.eldest() method when attaching the source but cannot use it.

Any idea why it isn't available?

有帮助吗?

解决方案

It is a hidden method - invokable using reflection, but isn't part of the public API and therefore likely to change between versions of android

https://android.googlesource.com/platform/libcore/+/a47f800/luni/src/main/java/java/util/LinkedHashMap.java line 169 the @hide annotation stops it from being visible to the public

其他提示

Because there no such method in this class and any super type:

LinkedHashMap

HashMap

AbstractMap

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top