java.io
Class ObjectOutputStream.ReplaceTable

java.lang.Object
  extended byjava.io.ObjectOutputStream.ReplaceTable
Enclosing class:
ObjectOutputStream

private static class ObjectOutputStream.ReplaceTable
extends Object

Lightweight identity hash table which maps objects to replacement objects.


Field Summary
private  ObjectOutputStream.HandleTable htab
           
private  Object[] reps
           
 
Constructor Summary
(package private) ObjectOutputStream.ReplaceTable(int initialCapacity, float loadFactor)
          Creates new ReplaceTable with given capacity and load factor.
 
Method Summary
(package private)  void assign(Object obj, Object rep)
          Enters mapping from object to replacement object.
(package private)  void clear()
          Resets table to its initial (empty) state.
private  void grow()
          Increases table capacity.
(package private)  Object lookup(Object obj)
          Looks up and returns replacement for given object.
(package private)  int size()
          Returns the number of mappings currently in table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

htab

private final ObjectOutputStream.HandleTable htab

reps

private Object[] reps
Constructor Detail

ObjectOutputStream.ReplaceTable

ObjectOutputStream.ReplaceTable(int initialCapacity,
                                float loadFactor)
Creates new ReplaceTable with given capacity and load factor.

Method Detail

assign

void assign(Object obj,
            Object rep)
Enters mapping from object to replacement object.


lookup

Object lookup(Object obj)
Looks up and returns replacement for given object. If no replacement is found, returns the lookup object itself.


clear

void clear()
Resets table to its initial (empty) state.


size

int size()
Returns the number of mappings currently in table.


grow

private void grow()
Increases table capacity.