T - supported typepublic interface Indexer<T>
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
at(T obj,
Object key)
Get the value for the list for map.
|
void |
set(T obj,
Object key,
Object v)
Set the list for map at the key with the value.
|
int |
size(T obj)
Get the size of the list or map.
|
default boolean |
supportsKey(Object key)
To test whether the key is allowed by the list or map.
|
default boolean supportsKey(Object key)
key - the keyint size(T obj) throws Exception
obj - the list or mapExceptionObject at(T obj, Object key) throws Throwable
obj - the list or mapkey - the keyThrowable - any