List of usage examples for java.lang.ref SoftReference get
public T get()
From source file:org.grails.buffer.StreamCharBuffer.java
protected void notifyBufferChange() { markBufferChanged();//from www . j av a 2s .c o m if (!notifyParentBuffersEnabled) return; if (parentBuffers == null) { return; } for (Iterator<SoftReference<StreamCharBufferKey>> i = parentBuffers.iterator(); i.hasNext();) { SoftReference<StreamCharBufferKey> ref = i.next(); final StreamCharBuffer.StreamCharBufferKey parentKey = ref.get(); boolean removeIt = true; if (parentKey != null) { StreamCharBuffer parent = parentKey.getBuffer(); removeIt = !parent.bufferChanged(this); } if (removeIt) { i.remove(); } } }
From source file:com.codename1.impl.android.AndroidImplementation.java
/** * @inheritDoc//from ww w. ja v a 2s.c o m */ public Object extractHardRef(Object o) { SoftReference w = (SoftReference) o; if (w != null) { return w.get(); } return null; }