Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
43 | 2 | 3 | 0.981 | namespace_member_declarations |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 43 | 4 | src/NHibernate/Type/SortedMapType.cs |
2 | 42 | 5 | src/NHibernate/Type/SortedSetType.cs |
| ||||
namespace NHibernate.Type { /// <summary> /// Extends the <see cref="MapType" /> to provide sorting. /// </summary> [Serializable] public class SortedMapType : MapType { private readonly IComparer comparer; /// <summary> /// Initializes a new instance of a <see cref="SortedMapType"/> class for /// a specific role using the <see cref="IComparer"/> to do the sorting. /// </summary> /// <param name="role">The role the persistent collection is in.</param> /// <param name="propertyRef">The name of the property in the /// owner object containing the collection ID, or <see langword="null" /> if it is /// the primary key.</param> /// <param name="comparer">The <see cref="IComparer"/> to use for the sorting.</param> /// <param name="isEmbeddedInXML"></param> public SortedMapType(string role, string propertyRef, IComparer comparer, bool isEmbeddedInXML) : base(role, propertyRef, isEmbeddedInXML) { this.comparer = comparer; } public IComparer Comparer { get { return comparer; } } public override object Instantiate(int anticipatedSize) { return new SortedList(comparer); } public override System.Type ReturnedClass { get { return typeof( SortedList); } } } } |
| ||||
namespace NHibernate.Type { /// <summary> /// Extends the <see cref="SetType" /> to provide sorting. /// </summary> [Serializable] public class SortedSetType : SetType { private readonly IComparer comparer; /// <summary> /// Initializes a new instance of a <see cref="SortedSetType"/> class for /// a specific role using the <see cref="IComparer"/> to do the sorting. /// </summary> /// <param name="role">The role the persistent collection is in.</param> /// <param name="propertyRef">The name of the property in the /// owner object containing the collection ID, or <see langword="null" /> if it is /// the primary key.</param> /// <param name="comparer">The <see cref="IComparer"/> to use for the sorting.</param> /// <param name="isEmbeddedInXML"></param> public SortedSetType(string role, string propertyRef, IComparer comparer, bool isEmbeddedInXML) : base(role, propertyRef, isEmbeddedInXML) { this.comparer = comparer; } public IComparer Comparer { get { return comparer; } } public override object Instantiate(int anticipatedSize) { return new SortedSet(comparer); } public override System.Type ReturnedClass { get { return typeof( SortedSet); } } } } |
| |||
namespace NHibernate.Type { /// <summary> /// Extends the <see cref="MapType" /> to provide sorting. /// Extends the <see cref="SetType" /> to provide sorting. /// </summary> [Serializable] public class [[#variable5eb0d7a0]]: [[#variable5eb0d720]] { private readonly IComparer comparer; /// <summary> /// Initializes a new instance of a <see cref="SortedMapType"/> class for /// Initializes a new instance of a <see cref="SortedSetType"/> class for /// a specific role using the <see cref="IComparer"/> to do the sorting. /// </summary> /// <param name="role">The role the persistent collection is in.</param> /// <param name="propertyRef">The name of the property in the /// owner object containing the collection ID, or <see langword="null" /> if it is /// the primary key.</param> /// <param name="comparer">The <see cref="IComparer"/> to use for the sorting.</param> /// <param name="isEmbeddedInXML"></param> public [[#variable5eb0d7a0]](string role, string propertyRef, IComparer comparer, bool isEmbeddedInXML): base(role, propertyRef, isEmbeddedInXML) { this.comparer = comparer; } public IComparer Comparer { get { return comparer; } } public override object Instantiate(int anticipatedSize) { return new [[#variable5eb0d680]](comparer); } public override System.Type ReturnedClass { get { return typeof( [[#variable5eb0d680]]); } } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5eb0d7a0]] | SortedMapType |
1 | 2 | [[#5eb0d7a0]] | SortedSetType |
2 | 1 | [[#5eb0d720]] | MapType |
2 | 2 | [[#5eb0d720]] | SetType |
3 | 1 | [[#5eb0d680]] | SortedList |
3 | 2 | [[#5eb0d680]] | SortedSet |