3435363738394041424344
String pooled = "POOLED"; ObjectPool p = new ObjectPoolImpl(); assertNull(p.get(key)); p.store(key, pooled); assertSame(pooled, p.get(key)); assertNull(p.get(key)); }
5051525354555657585960
Object pooled1 = new Object(); Object pooled2 = new Object(); String key = "POOLED-KEY"; p.store(key, pooled1); p.store(key, pooled2); // No guarantee that we'll get them out in the order they were put in. List l = new ArrayList();
5152535455565758596061
Object pooled2 = new Object(); String key = "POOLED-KEY"; p.store(key, pooled1); p.store(key, pooled2); // No guarantee that we'll get them out in the order they were put in. List l = new ArrayList(); l.add(pooled1);
116117118119120121122123124125126
// Training engine.getLocale(); engineControl.setReturnValue(Locale.KOREAN); pool.store(Locale.KOREAN, engine); replayControls(); EngineManagerImpl m = new EngineManagerImpl();
3637383940414243444546
5253545556575859606162