Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HashLookupValueList.cs
Go to the documentation of this file.
2
3internal struct HashLookupValueList<TElement, TOrderKey>
4{
6
8
10
12
13 internal HashLookupValueList(TElement firstValue, TOrderKey firstOrderKey)
14 {
15 _head = CreatePair(firstValue, firstOrderKey);
16 _tail = null;
17 }
18
19 internal bool Add(TElement value, TOrderKey orderKey)
20 {
21 bool flag = _tail == null;
22 if (flag)
23 {
25 }
26 _tail.Add(CreatePair(value, orderKey));
27 return flag;
28 }
29
30 private static Pair<TElement, TOrderKey> CreatePair(TElement value, TOrderKey orderKey)
31 {
32 return new Pair<TElement, TOrderKey>(value, orderKey);
33 }
34}
void Add(TInputOutput e)
Definition ListChunk.cs:27
readonly Pair< TElement, TOrderKey > _head
HashLookupValueList(TElement firstValue, TOrderKey firstOrderKey)
static Pair< TElement, TOrderKey > CreatePair(TElement value, TOrderKey orderKey)
ListChunk< Pair< TElement, TOrderKey > > Tail
ListChunk< Pair< TElement, TOrderKey > > _tail
bool Add(TElement value, TOrderKey orderKey)