-
Notifications
You must be signed in to change notification settings - Fork 48
/
SheetRow.cs
43 lines (34 loc) · 935 Bytes
/
SheetRow.cs
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
using System;
using System.Collections.Generic;
namespace Nekoyume.TableData
{
[Serializable]
public abstract class SheetRow<T>
{
public abstract T Key { get; }
public abstract void Set(IReadOnlyList<string> fields);
public virtual void Validate()
{
}
public virtual void EndOfSheetInitialize()
{
}
#region Equals
private bool Equals(SheetRow<T> other)
{
return Key.Equals(other.Key);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((SheetRow<T>) obj);
}
public override int GetHashCode()
{
return Key.GetHashCode();
}
#endregion
}
}