Previous CloneSet | Next CloneSet | Back to Main Report |

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

6 | 4 | 1 | 0.986 | class_member_declaration |

Clone Abstraction | Parameter Bindings |

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

1 | 6 | 184 | src/Iesi.Collections/ImmutableSet.cs |

2 | 6 | 200 | src/Iesi.Collections/ImmutableSet.cs |

3 | 6 | 216 | src/Iesi.Collections/ImmutableSet.cs |

4 | 6 | 232 | src/Iesi.Collections/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 Union(ISet a) { ISet m = this ; while (m is ImmutableSet) m = ((ImmutableSet) m).BasisSet; return new ImmutableSet(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 Intersect(ISet a) { ISet m = this ; while (m is ImmutableSet) m = ((ImmutableSet) m).BasisSet; return new ImmutableSet(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 Minus(ISet a) { ISet m = this ; while (m is ImmutableSet) m = ((ImmutableSet) m).BasisSet; return new ImmutableSet(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 ExclusiveOr(ISet a) { ISet m = this ; while (m is ImmutableSet) m = ((ImmutableSet) m).BasisSet; return new ImmutableSet(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 [[#variable2c60ce20]](ISet a) { ISet m = this ; while (m is ImmutableSet) m = ((ImmutableSet)m).BasisSet; return new ImmutableSet(m. [[#variable2c60ce20]](a)); } |

CloneAbstraction |

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

1 | 1 | [[#2c60ce20]] | ExclusiveOr |

1 | 2 | [[#2c60ce20]] | Minus |

1 | 3 | [[#2c60ce20]] | Intersect |

1 | 4 | [[#2c60ce20]] | Union |