001: package java.util;
002:
003: import java.lang.ref.ReferenceQueue;
004: import java.lang.ref.WeakReference;
005:
006: public class WeakHashMap extends AbstractMap implements Map {
007: static final Object NULL_KEY = new Object() {
008: public int hashCode() {
009: }
010:
011: public boolean equals(Object o) {
012: }
013: };
014: int size;
015: int modCount;
016:
017: private final class WeakEntrySet extends AbstractSet {
018: WeakEntrySet() {
019: }
020:
021: public int size() {
022: }
023:
024: public Iterator iterator() {
025: }
026: }
027:
028: private static class WeakBucket extends WeakReference {
029: Object value;
030: WeakBucket next;
031: int slot;
032:
033: public WeakBucket(Object key, ReferenceQueue queue,
034: Object value, int slot) {
035: }
036:
037: class WeakEntry implements Map.Entry {
038: Object key;
039:
040: public WeakEntry(Object key) {
041: }
042:
043: public WeakBucket getBucket() {
044: }
045:
046: public Object getKey() {
047: }
048:
049: public Object getValue() {
050: }
051:
052: public Object setValue(Object newVal) {
053: }
054:
055: public int hashCode() {
056: }
057:
058: public boolean equals(Object o) {
059: }
060:
061: public String toString() {
062: }
063: }
064:
065: WeakEntry getEntry() {
066: }
067: }
068:
069: WeakBucket[] buckets;
070:
071: public WeakHashMap() {
072: }
073:
074: public WeakHashMap(int initialCapacity) {
075: }
076:
077: public WeakHashMap(int initialCapacity, float loadFactor) {
078: }
079:
080: public WeakHashMap(Map m) {
081: }
082:
083: private int hash(Object key) {
084: }
085:
086: void cleanQueue() {
087: }
088:
089: private void rehash() {
090: }
091:
092: private WeakBucket.WeakEntry internalGet(Object key) {
093: }
094:
095: private void internalAdd(Object key, Object value) {
096: }
097:
098: void internalRemove(WeakBucket bucket) {
099: }
100:
101: public int size() {
102: }
103:
104: public boolean isEmpty() {
105: }
106:
107: public boolean containsKey(Object key) {
108: }
109:
110: public Object get(Object key) {
111: }
112:
113: public Object put(Object key, Object value) {
114: }
115:
116: public Object remove(Object key) {
117: }
118:
119: public Set entrySet() {
120: }
121:
122: public void clear() {
123: }
124:
125: public boolean containsValue(Object value) {
126: }
127:
128: public Set keySet() {
129: }
130:
131: public void putAll(Map m) {
132: }
133:
134: public Collection values() {
135: }
136: }
|