Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.0.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.image.loader.util
Class SoftReferenceWithKey

    java.lang.Object
      java.lang.ref.Reference<T>
          java.lang.ref.SoftReference
              org.apache.xmlgraphics.image.loader.util.SoftReferenceWithKey

    public class SoftReferenceWithKey

extends SoftReference

Special SoftReference subclass that holds an additional key object that can be used to remove a reference from a Map once the referenced object is collected, for example.

Constructor Summary
`SoftReferenceWithKey(Object referent, Object key, ReferenceQueue q)` Creates a new SoftReference with a key.

Method Summary
`Object` | `getKey()` Returns the key associated with this reference.

Methods inherited from class java.lang.ref.SoftReference
`get`

Methods inherited from class java.lang.ref.Reference
`clear, enqueue, isEnqueued`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SoftReferenceWithKey

    public SoftReferenceWithKey(Object referent,
                                Object key,
                                ReferenceQueue q)

  Creates a new SoftReference with a key.

  Parameters:
    `referent` - object the new soft reference will refer to
    `key` - the key object
    `q` - queue the soft reference is registered with

Method Detail

### getKey

    public Object getKey()

  Returns the key associated with this reference.

  Returns:
    the key

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.0.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.