Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 2 | 0.982 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 438 | src/Iesi.Collections/Generic/Set.cs |
2 | 8 | 120 | src/Iesi.Collections/Set.cs |
| ||||
/// <summary> /// Performs Intersect when called trhough non-generic ISet interface /// </summary> /// <param name="a"></param> /// <returns></returns> protected virtual ISet NonGenericIntersect(ISet a) { ISet resultSet = (ISet) this.Clone(); if (a != null) resultSet.RetainAll(a); else resultSet.Clear(); return resultSet; } |
| ||||
/// <summary> /// Performs an "intersection" of the two sets, where only the elements /// that are present in both sets remain. That is, the element is included if it exists in /// both sets. The <c>Intersect()</c> operation does not modify the input sets. It returns /// a <c>Clone()</c> of this set with the appropriate elements removed. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>The intersection of this set with <c>a</c>.</returns> public virtual ISet Intersect(ISet a) { ISet resultSet = (ISet) this.Clone(); if (a != null) resultSet.RetainAll(a); else resultSet.Clear(); return resultSet; } |
| |||
[[#variable28f42f60]]virtual ISet [[#variable28db2060]](ISet a) { ISet resultSet = (ISet)this.Clone(); if (a != null) resultSet.RetainAll(a); else resultSet.Clear(); return resultSet; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#28f42f60]] | /// <summary> /// Performs an "intersection" of the two sets, where only the elements /// that are present in both sets remain. That is, the element is included if it exists in /// both sets. The <c>Intersect()</c> operation does not modify the input sets. It returns /// a <c>Clone()</c> of this set with the appropriate elements removed. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>The intersection of this set with <c>a</c>.</returns> public |
1 | 2 | [[#28f42f60]] | /// <summary> /// Performs Intersect when called trhough non-generic ISet interface /// </summary> /// <param name="a"></param> /// <returns></returns> protected |
2 | 1 | [[#28db2060]] | Intersect |
2 | 2 | [[#28db2060]] | NonGenericIntersect |