private void readObject(ObjectInputStream in) throws IOException { in.defaultReadObject(); initializeSet(); int size = in.readInt(); for (int i = 0; i < size; i++) try { put((K) in.readObject(), (V) in.readObject()); } catch (ClassNotFoundException e) { throw new IOException(e); } }
public TreeMap(Comparator<K> comparator) { this.comparator = comparator; initializeSet(); }