Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class AType : IComparable<AType>, IEquatable<AType>
- {
- public AType() { DefaultInit(); }
- public AType(string str) { StringInit(str); }
- public int CompareTo([AllowNull] AType other)
- {
- return CompareToImpl(other);
- }
- public bool Equals([AllowNull] AType other)
- {
- return EqualsImpl(other);
- }
- public void SetFromString(string str)
- {
- StringInit(str);
- }
- public override string ToString()
- {
- return ToStringImpl();
- }
- protected abstract int CompareToImpl([AllowNull] AType other);
- protected abstract bool EqualsImpl(AType other);
- protected abstract void DefaultInit();
- protected abstract void StringInit(string str);
- protected abstract string ToStringImpl();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement