Repository navigation
Expand file tree
/
Copy pathDoublyLinkedListMethodsBase.cs
More file actions
80 lines (75 loc) · 2.51 KB
/
Copy pathDoublyLinkedListMethodsBase.cs
File metadata and controls
80 lines (75 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System.Runtime.CompilerServices;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Platform.Collections.Methods.Lists
{
/// <remarks>
/// Based on <a href="https://en.wikipedia.org/wiki/Doubly_linked_list">doubly linked list</a> implementation.
/// </remarks>
public abstract class DoublyLinkedListMethodsBase<TElement> : GenericCollectionMethodsBase<TElement>
{
/// <summary>
/// <para>
/// Gets the previous using the specified element.
/// </para>
/// <para></para>
/// </summary>
/// <param name="element">
/// <para>The element.</para>
/// <para></para>
/// </param>
/// <returns>
/// <para>The element</para>
/// <para></para>
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected abstract TElement GetPrevious(TElement element);
/// <summary>
/// <para>
/// Gets the next using the specified element.
/// </para>
/// <para></para>
/// </summary>
/// <param name="element">
/// <para>The element.</para>
/// <para></para>
/// </param>
/// <returns>
/// <para>The element</para>
/// <para></para>
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected abstract TElement GetNext(TElement element);
/// <summary>
/// <para>
/// Sets the previous using the specified element.
/// </para>
/// <para></para>
/// </summary>
/// <param name="element">
/// <para>The element.</para>
/// <para></para>
/// </param>
/// <param name="previous">
/// <para>The previous.</para>
/// <para></para>
/// </param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected abstract void SetPrevious(TElement element, TElement previous);
/// <summary>
/// <para>
/// Sets the next using the specified element.
/// </para>
/// <para></para>
/// </summary>
/// <param name="element">
/// <para>The element.</para>
/// <para></para>
/// </param>
/// <param name="next">
/// <para>The next.</para>
/// <para></para>
/// </param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected abstract void SetNext(TElement element, TElement next);
}
}