Explicitly sets an object to use for a given name. The name is case-insensitive. @param name the name of the object. @param object the corresponding object. @return this loader.
(String name, T object)
| 274 | * @return this loader. |
| 275 | */ |
| 276 | public Loader<T> setObject(String name, T object) |
| 277 | { |
| 278 | synchronized (nameMap) |
| 279 | { |
| 280 | nameMap.put(name, object); |
| 281 | } |
| 282 | return this; |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Get or load an object by name. |