Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
46 | 2 | 1 | 0.972 | class_member_declarations[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 46 | 187 | src/Iesi.Collections/Generic/SynchronizedSet.cs |
2 | 51 | 190 | src/Iesi.Collections/SynchronizedSet.cs |
| ||||
/// <summary> /// The number of elements contained in this collection. /// </summary> public override sealed int Count { get { lock (mSyncRoot) { return mBasisSet.Count; } } } /// <summary> /// Returns <see langword="true" />, indicating that this object is thread-safe. The exception to this /// is enumeration, which is inherently not thread-safe. Use the <c>SyncRoot</c> object to /// lock this object for the entire duration of the enumeration. /// </summary> public override sealed bool IsSynchronized { get { return true; } } /// <summary> /// Returns an object that can be used to synchronize the <c>Set</c> between threads. /// </summary> public override sealed object SyncRoot { get { return mSyncRoot; } } /// <summary> /// Enumeration is, by definition, not thread-safe. Use a <c>lock</c> on the <c>SyncRoot</c> /// to synchronize the entire enumeration process. /// </summary> /// <returns></returns> public override sealed IEnumerator<T> GetEnumerator() { return mBasisSet.GetEnumerator(); } /// <summary> /// Returns a clone of the <c>Set</c> instance. /// </summary> /// <returns>A clone of this object.</returns> public override object Clone() { return new SynchronizedSet((ISet) mBasisSet.Clone()); } |
| ||||
/// <summary> /// The number of elements contained in this collection. /// </summary> public override sealed int Count { get { lock (mSyncRoot) { return mBasisSet.Count; } } } /// <summary> /// Returns <see langword="true" />, indicating that this object is thread-safe. The exception to this /// is enumeration, which is inherently not thread-safe. Use the <see cref="SyncRoot" /> object to /// lock this object for the entire duration of the enumeration. /// </summary> public override sealed bool IsSynchronized { get { return true; } } /// <summary> /// Returns an object that can be used to synchronize the set between threads. /// </summary> public override sealed object SyncRoot { get { return mSyncRoot; } } /// <summary> /// Returns an enumerator that iterates through the set. /// </summary> /// <returns> /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the set. /// </returns> /// <remarks> /// Enumeration is, by definition, not thread-safe. Use a <see langword="lock" /> on the <see cref="SyncRoot" /> /// to synchronize the entire enumeration process. /// </remarks> public override sealed IEnumerator GetEnumerator() { return mBasisSet.GetEnumerator(); } /// <summary> /// Returns a clone of this instance. /// </summary> /// <returns>A clone of this object.</returns> public override object Clone() { return new SynchronizedSet((ISet) mBasisSet.Clone()); } |
| |||
/// <summary> /// The number of elements contained in this collection. /// </summary> public override sealed int Count { get { lock (mSyncRoot) { return mBasisSet.Count; } } } /// <summary> /// Returns <see langword="true" />, indicating that this object is thread-safe. The exception to this /// is enumeration, which is inherently not thread-safe. Use the <c>SyncRoot</c> object to /// is enumeration, which is inherently not thread-safe. Use the <see cref="SyncRoot" /> object to /// lock this object for the entire duration of the enumeration. /// </summary> public override sealed bool IsSynchronized { get { return true; } } /// <summary> /// Returns an object that can be used to synchronize the <c>Set</c> between threads. /// Returns an object that can be used to synchronize the set between threads. /// </summary> public override sealed object SyncRoot { get { return mSyncRoot; } } /// <summary> /// Enumeration is, by definition, not thread-safe. Use a <c>lock</c> on the <c>SyncRoot</c> /// Returns an enumerator that iterates through the set. /// </summary> /// <returns> /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the set. /// </returns> /// <remarks> /// Enumeration is, by definition, not thread-safe. Use a <see langword="lock" /> on the <see cref="SyncRoot" /> /// to synchronize the entire enumeration process. /// </summary> /// <returns></returns> /// </remarks> public override sealed [[#variable550e6460]]GetEnumerator() { return mBasisSet.GetEnumerator(); } /// <summary> /// Returns a clone of the <c>Set</c> instance. /// Returns a clone of this instance. /// </summary> /// <returns>A clone of this object.</returns> public override object Clone() { return new SynchronizedSet((ISet)mBasisSet.Clone()); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#550e6460]] | IEnumerator<T> |
1 | 2 | [[#550e6460]] | IEnumerator |