/** * Copy constructor. */ @SuppressWarnings("unchecked") private LinkedCaseInsensitiveMap(LinkedCaseInsensitiveMap<V> other) { this.targetMap = (LinkedHashMap<String, V>) other.targetMap.clone(); this.caseInsensitiveKeys = (HashMap<String, String>) other.caseInsensitiveKeys.clone(); this.locale = other.locale; }
@Override public Dict clone() { return (Dict) super.clone(); } }
@Override public Dict clone() { return (Dict) super.clone(); } }
/** {@inheritDoc} */ @Override public Object clone() { GridBoundedLinkedHashMap<K, V> m = (GridBoundedLinkedHashMap<K, V>)super.clone(); m.maxCap = maxCap; return m; } }
/** * Performs a shallow clone * * @return The cloned instance */ @Override public Object clone() { return super.clone(); } }
/** * Copy constructor. */ @SuppressWarnings("unchecked") private LinkedCaseInsensitiveMap(LinkedCaseInsensitiveMap<V> other) { this.targetMap = (LinkedHashMap<String, V>) other.targetMap.clone(); this.caseInsensitiveKeys = (HashMap<String, String>) other.caseInsensitiveKeys.clone(); this.locale = other.locale; }
protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return new LinkedHashMap(this); } } }
@Override protected Object clone() { if (map == null) { return null; } if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } return copy(this); }
@Override protected Object clone() throws CloneNotSupportedException { Configurable copy = (Configurable) super.clone(); if (properties != null) { copy.properties = new Properties(properties); } if (customAttributes != null) { copy.customAttributes = (HashMap) customAttributes.clone(); } if (autoImports != null) { copy.autoImports = (LinkedHashMap<String, String>) autoImports.clone(); } if (autoIncludes != null) { copy.autoIncludes = (ArrayList<String>) autoIncludes.clone(); } return copy; }
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map */ @Override public IgnoreLanguagesSettings clone() { IgnoreLanguagesSettings copy = (IgnoreLanguagesSettings) super.clone(); for (Map.Entry<IgnoreLanguage, TreeMap<IgnoreLanguagesSettings.KEY, Object>> entry : copy.entrySet()) { @SuppressWarnings("unchecked") TreeMap<IgnoreLanguagesSettings.KEY, Object> data = (TreeMap<KEY, Object>) entry.getValue().clone(); copy.put(entry.getKey(), data); } return copy; } }
protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return new LinkedHashMap(this); } } }
@SuppressWarnings("unchecked") private LinkedCaseInsensitiveMap(LinkedCaseInsensitiveMap<V> other) { this.mSource = (LinkedHashMap<String, V>)other.mSource.clone(); this.mCaseInsensitiveKeys = (HashMap<String, String>)other.mCaseInsensitiveKeys.clone(); this.mLocale = other.mLocale; // No need to clone. }
/** * Returns a shallow copy of this map. * * @return A shallow copy of this map. */ @Override @SuppressWarnings("unchecked") public CheckedHashMap<K, V> clone() { synchronized (getLock()) { return (CheckedHashMap) super.clone(); } } }
public AbstractIndex(AbstractIndex parent) { this(); this.version = parent.version; this.indexedFile = parent.indexedFile; this.indexedFileSize = parent.indexedFileSize; this.indexedFileTS = parent.indexedFileTS; this.indexedFileMD5 = parent.indexedFileMD5; this.flags = parent.flags; this.properties = (LinkedHashMap<String, String>) parent.properties.clone(); }
@Override public Context clone() { final Context rval = (Context) super.clone(); // TODO: is this shallow copy enough? probably not, but it passes all // the tests! rval.termDefinitions = new LinkedHashMap<>(this.termDefinitions); return rval; }
@Override public Context clone() { final Context rval = (Context) super.clone(); // TODO: is this shallow copy enough? probably not, but it passes all // the tests! rval.termDefinitions = new LinkedHashMap<String, Object>(this.termDefinitions); return rval; }
@Override protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return Maps.copy(this); } } }
@Override protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return Maps.copy(this); } } }
@Override protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return Maps.copy(this); } } }
public RecordRow clone() { RecordRow newRecordRow = new RecordRow(); newRecordRow.name_cells = (LinkedHashMap<String, Object>) this.name_cells.clone(); newRecordRow.id_cells = (HashMap<Integer, Object>) this.id_cells.clone(); return newRecordRow; } }