CloneSet431


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24220.986class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12483
src/Iesi.Collections/Generic/Set.cs
225243
src/Iesi.Collections/Generic/Set.cs
Clone Instance
1
Line Count
24
Source Line
83
Source File
src/Iesi.Collections/Generic/Set.cs

                /// <summary>
                /// Performs a "union" of two sets, where all the elements
                /// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
                /// The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
                /// added in.  Neither of the input sets is modified by the operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static ISet<T> Union(ISet<T> a, ISet<T> b)
                {
                        if (a == null && b == null)
                                return null;
                        else if (a == null)
                                return (ISet<T> )b.Clone();
                             else
                             if (b == null)
                                return (ISet<T> )a.Clone();
                             else
                                return a.Union(b);
                }

                /// <summary>
                /// Performs a "union" of two sets, where all the elements
                /// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
                /// The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
                /// added in.  Neither of the input sets is modified by the operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static Set<T> operator | (Set<T> a, Set<T> b)
                {
                        return (Set<T> )Union(a, b);
                }



Clone Instance
2
Line Count
25
Source Line
243
Source File
src/Iesi.Collections/Generic/Set.cs

                /// <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 one of the sets
                /// (<c>a</c> if it is not <see langword="null" />) containing
                /// the elements from the exclusive-or operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static ISet<T> ExclusiveOr(ISet<T> a, ISet<T> b)
                {
                        if (a == null && b == null)
                                return null;
                        else if (a == null)
                                return (ISet<T> )b.Clone();
                             else
                             if (b == null)
                                return (ISet<T> )a.Clone();
                             else
                                return a.ExclusiveOr(b);
                }

                /// <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 one of the sets
                /// (<c>a</c> if it is not <see langword="null" />) containing
                /// the elements from the exclusive-or operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static Set<T> operator ^ (Set<T> a, Set<T> b)
                {
                        return (Set<T> )ExclusiveOr(a, b);
                }



Clone AbstractionParameter Count: 2Parameter Bindings

/// <summary>
/// Performs a "union" of two sets, where all the elements
/// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
/// The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
/// added in.  Neither of the input sets is modified by the operation.
/// 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 one of the sets
/// (<c>a</c> if it is not <see langword="null" />) containing
/// the elements from the exclusive-or operation.
/// </summary>
/// <param name="a">A set of elements.</param>
/// <param name="b">A set of elements.</param>
/// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
/// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
public static ISet<T> [[#variable56a73760]](ISet<T> a, ISet<T> b)
{
   if (a == null && b == null)
      return null;
   else
      if (a == null)
         return (ISet<T> )b.Clone();
      else
         if (b == null)
            return (ISet<T> )a.Clone();
         else
            return a. [[#variable56a73760]](b);
}

/// <summary>
/// Performs a "union" of two sets, where all the elements
/// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
/// The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
/// added in.  Neither of the input sets is modified by the operation.
/// 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 one of the sets
/// (<c>a</c> if it is not <see langword="null" />) containing
/// the elements from the exclusive-or operation.
/// </summary>
/// <param name="a">A set of elements.</param>
/// <param name="b">A set of elements.</param>
/// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
/// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
public static Set<T> operator [[#variable657b4300]](Set<T> a, Set<T> b)
{
   return (Set<T> ) [[#variable56a73760]](a, b);
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#56a73760]]
Union 
12[[#56a73760]]
ExclusiveOr 
21[[#657b4300]]
| 
22[[#657b4300]]
^