/** * Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result. * * @return a deep copy of the receiver. */ @SuppressWarnings("unchecked") // seemingly unavoidable. public AbstractShortObjectMap<T> copy() { return this.getClass().cast(clone()); }
/** * Returns a deep copy of the receiver. * * @return a deep copy of the receiver. */ @SuppressWarnings("unchecked") @Override public OpenShortObjectHashMap<T> clone() { OpenShortObjectHashMap<T> copy = (OpenShortObjectHashMap<T>) super.clone(); copy.table = copy.table.clone(); copy.values = copy.values.clone(); copy.state = copy.state.clone(); return copy; }
/** * Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result. * * @return a deep copy of the receiver. */ @SuppressWarnings("unchecked") // seemingly unavoidable. public AbstractShortObjectMap<T> copy() { return this.getClass().cast(clone()); }
/** * Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result. * * @return a deep copy of the receiver. */ @SuppressWarnings("unchecked") // seemingly unavoidable. public AbstractShortObjectMap<T> copy() { return this.getClass().cast(clone()); }
/** * Returns a deep copy of the receiver. * * @return a deep copy of the receiver. */ @SuppressWarnings("unchecked") @Override public OpenShortObjectHashMap<T> clone() { OpenShortObjectHashMap<T> copy = (OpenShortObjectHashMap<T>) super.clone(); copy.table = copy.table.clone(); copy.values = copy.values.clone(); copy.state = copy.state.clone(); return copy; }
/** * Returns a deep copy of the receiver. * * @return a deep copy of the receiver. */ @SuppressWarnings("unchecked") @Override public OpenShortObjectHashMap<T> clone() { OpenShortObjectHashMap<T> copy = (OpenShortObjectHashMap<T>) super.clone(); copy.table = copy.table.clone(); copy.values = copy.values.clone(); copy.state = copy.state.clone(); return copy; }