Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## serp.util
Class SoftValueMap

    java.lang.Object
      |
      +--serp.util.RefValueMap
            |
            +--serp.util.SoftValueMap

All Implemented Interfaces:
  Map, RefMap

Deprecated. Replaced by the `ReferenceMap`.

public class SoftValueMap
extends RefValueMap

Map implementation in which the values are held as soft references.

Expired values are removed from the map before any mutator methods; removing before accessor methods can lead to `ConcurrentModificationException`s. Thus, the following methods may produce results which include key/value pairs that have expired:

- `size`
- `isEmpty`
- `containsKey`
- `keySet.size,contains,isEmpty`
- `entrySet.size,contains,isEmpty`
- `values.size,contains,isEmpty`

By default, all methods are delegated to the internal map provided at construction. Thus, the hashing algorithm, ordering, etc of the given map will be preserved. Performance is similar to that of the internal map instance.

Inner classes inherited from class serp.util.RefValueMap
`RefValueMap.RefMapValue`

Inner classes inherited from class java.util.Map
`Map.Entry`

Constructor Summary
`SoftValueMap()` Deprecated. Equivalent to `SoftValueMap (new HashMap ())`.
`SoftValueMap(Map map)` Deprecated. Construct a SoftValueMap with the given interal map.

Method Summary
`protected RefValueMap.RefMapValue` | `createRefMapValue(Object key, Object value, ReferenceQueue queue)` Deprecated. Create a weak or soft reference to hold the given value.

Methods inherited from class serp.util.RefValueMap
`clear, containsKey, containsValue, entrySet, equals, get, isEmpty, keySet, makeHard, makeReference, put, putAll, remove, removedReference, size, toString, values`

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

Methods inherited from interface java.util.Map
`hashCode`

Constructor Detail

### SoftValueMap

    public SoftValueMap()

  Deprecated.
  Equivalent to `SoftValueMap (new HashMap ())`.

### SoftValueMap

    public SoftValueMap(Map map)

  Deprecated.
  Construct a SoftValueMap with the given interal map. The internal map will be cleared. It should not be accessed in any way after being given to this constructor; this map will 'inherit' its behavior, however. For example, if the given map is a `LinkedHashMap`, the `RefValueMap.values()` method of this map will return values in insertion order.

Method Detail

### createRefMapValue

    protected RefValueMap.RefMapValue createRefMapValue(Object key,
                                                        Object value,
                                                        ReferenceQueue queue)

  Deprecated.
  Description copied from class: `RefValueMap`
  Create a weak or soft reference to hold the given value.
  Overrides:
    `createRefMapValue` in class `RefValueMap`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.