|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
namespace Unity.UIWidgets.foundation { |
|
|
|
public abstract class Key : IEquatable<Key> { |
|
|
|
public abstract class Key { |
|
|
|
} |
|
|
|
|
|
|
|
public virtual bool Equals(Key other) { |
|
|
|
return base.Equals(other); |
|
|
|
} |
|
|
|
|
|
|
|
public static bool operator ==(Key left, Key right) { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public readonly T value; |
|
|
|
|
|
|
|
public override bool Equals(Key other) { |
|
|
|
if (ReferenceEquals(null, other)) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (ReferenceEquals(this, other)) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
if (other.GetType() != typeof(ValueKey<T>)) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
ValueKey<T> valueKey = (ValueKey<T>) other; |
|
|
|
|
|
|
|
return this.Equals(valueKey); |
|
|
|
} |
|
|
|
|
|
|
|
public bool Equals(ValueKey<T> other) { |
|
|
|
if (ReferenceEquals(null, other)) { |
|
|
|