Previous CloneSet | Next CloneSet | Back to Main Report |

Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|

4 | 4 | 1 | 0.982 | class_member_declaration |

Clone Abstraction | Parameter Bindings |

Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|

1 | 4 | 190 | src/Iesi.Collections/Generic/ImmutableSet.cs |

2 | 4 | 204 | src/Iesi.Collections/Generic/ImmutableSet.cs |

3 | 4 | 218 | src/Iesi.Collections/Generic/ImmutableSet.cs |

4 | 4 | 232 | src/Iesi.Collections/Generic/ImmutableSet.cs |

| ||||

/// <summary> /// Performs a "union" of the two sets, where all the elements /// in both sets are present. That is, the element is included if it is in either <c>a</c> or <c>b</c>. /// Neither this set nor the input set are modified during the operation. The return value /// is a <c>Clone()</c> of this set with the extra elements added in. /// </summary> /// <param name="a">A collection of elements.</param> /// <returns>A new <c>Set</c> containing the union of this <c>Set</c> with the specified collection. /// Neither of the input objects is modified by the union.</returns> public override sealed ISet<T> Union(ISet<T> a) { ISet<T> m = GetUltimateBasisSet(); return new ImmutableSet<T> (m.Union(a)); } |

| ||||

/// <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 override sealed ISet<T> Intersect(ISet<T> a) { ISet<T> m = GetUltimateBasisSet(); return new ImmutableSet<T> (m.Intersect(a)); } |

| ||||

/// <summary> /// Performs a "minus" of set <c>b</c> from set <c>a</c>. This returns a set of all /// the elements in set <c>a</c>, removing the elements that are also in set <c>b</c>. /// The original sets are not modified during this operation. The result set is a <c>Clone()</c> /// of this <c>Set</c> containing the elements from the operation. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>A set containing the elements from this set with the elements in <c>a</c> removed.</returns> public override sealed ISet<T> Minus(ISet<T> a) { ISet<T> m = GetUltimateBasisSet(); return new ImmutableSet<T> (m.Minus(a)); } |

| ||||

/// <summary> /// Performs an "exclusive-or" of the two sets, keeping only the elements that /// are in one of the sets, but not in both. The original sets are not modified /// during this operation. The result set is a <c>Clone()</c> of this set containing /// the elements from the exclusive-or operation. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>A set containing the result of <c>a ^ b</c>.</returns> public override sealed ISet<T> ExclusiveOr(ISet<T> a) { ISet<T> m = GetUltimateBasisSet(); return new ImmutableSet<T> (m.ExclusiveOr(a)); } |

| |||

/// <summary> /// Performs an "exclusive-or" of the two sets, keeping only the elements that /// are in one of the sets, but not in both. The original sets are not modified /// during this operation. The result set is a <c>Clone()</c> of this set containing /// the elements from the exclusive-or operation. /// Performs a "minus" of set <c>b</c> from set <c>a</c>. This returns a set of all /// the elements in set <c>a</c>, removing the elements that are also in set <c>b</c>. /// The original sets are not modified during this operation. The result set is a <c>Clone()</c> /// of this <c>Set</c> containing the elements from the operation. /// 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. /// Performs a "union" of the two sets, where all the elements /// in both sets are present. That is, the element is included if it is in either <c>a</c> or <c>b</c>. /// Neither this set nor the input set are modified during the operation. The return value /// is a <c>Clone()</c> of this set with the extra elements added in. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>A set containing the result of <c>a ^ b</c>.</returns> /// <returns>A set containing the elements from this set with the elements in <c>a</c> removed.</returns> /// <returns>The intersection of this set with <c>a</c>.</returns> /// <param name="a">A collection of elements.</param> /// <returns>A new <c>Set</c> containing the union of this <c>Set</c> with the specified collection. /// Neither of the input objects is modified by the union.</returns> public override sealed ISet<T> [[#variable5742b120]](ISet<T> a) { ISet<T> m = GetUltimateBasisSet(); return new ImmutableSet<T> (m. [[#variable5742b120]](a)); } |

CloneAbstraction |

Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|

1 | 1 | [[#5742b120]] | ExclusiveOr |

1 | 2 | [[#5742b120]] | Minus |

1 | 3 | [[#5742b120]] | Intersect |

1 | 4 | [[#5742b120]] | Union |