Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
33 | 2 | 2 | 0.958 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 33 | 2 | src/Iesi.Collections/Generic/HashedSet.cs |
2 | 31 | 1 | src/Iesi.Collections/Generic/OrderedSet.cs |
| ||||
/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */ using System; using System.Collections.Generic; namespace Iesi.Collections.Generic { /// <summary> /// Implements a <c>Set</c> based on a Dictionary (which is equivalent of /// non-genric <c>HashTable</c>) This will give the best lookup, add, and remove /// performance for very large data-sets, but iteration will occur in no particular order. /// </summary> [Serializable] public class HashedSet<T> : DictionarySet<T> { /// <summary> /// Creates a new set instance based on a Dictinary. /// </summary> public HashedSet() { InternalDictionary = new Dictionary<T, object> (); } /// <summary> /// Creates a new set instance based on a Dictinary and /// initializes it based on a collection of elements. /// </summary> /// <param name="initialValues">A collection of elements that defines the initial set contents.</param> public HashedSet(ICollection<T> initialValues) : this() { this.AddAll(initialValues); } } } |
| ||||
using System; using System.Collections.Generic; namespace Iesi.Collections.Generic { /// <summary> /// Implements an ordered <c>Set</c> based on a dictionary. /// </summary> [Serializable] public class OrderedSet<T> : DictionarySet<T> { /// <summary> /// Initializes a new instance of the <see cref="OrderedSet{T}" /> class. /// </summary> public OrderedSet() { InternalDictionary = new Dictionary<T, object> (); } /// <summary> /// Initializes a new instance of the <see cref="OrderedSet{T}"/> class. /// </summary> /// <param name="initialValues">A collection of elements that defines the initial set contents.</param> public OrderedSet(ICollection<T> initialValues) : this() { AddAll(initialValues); } } } |
| |||
/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */ using System; using System.Collections.Generic; namespace Iesi.Collections.Generic { /// <summary> /// Implements a <c>Set</c> based on a Dictionary (which is equivalent of /// non-genric <c>HashTable</c>) This will give the best lookup, add, and remove /// performance for very large data-sets, but iteration will occur in no particular order. /// Implements an ordered <c>Set</c> based on a dictionary. /// </summary> [Serializable] public class [[#variable6af71f60]]<T>: DictionarySet<T> { /// <summary> /// Creates a new set instance based on a Dictinary. /// Initializes a new instance of the <see cref="OrderedSet{T}" /> class. /// </summary> public [[#variable6af71f60]]() { InternalDictionary = new Dictionary<T, object> (); } /// <summary> /// Creates a new set instance based on a Dictinary and /// initializes it based on a collection of elements. /// Initializes a new instance of the <see cref="OrderedSet{T}"/> class. /// </summary> /// <param name="initialValues">A collection of elements that defines the initial set contents.</param> public [[#variable6af71f60]](ICollection<T> initialValues): this() { [[#variable6af71f00]](initialValues); } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6af71f60]] | HashedSet |
1 | 2 | [[#6af71f60]] | OrderedSet |
2 | 1 | [[#6af71f00]] | this.AddAll |
2 | 2 | [[#6af71f00]] | AddAll |