using System;
namespace UnityAtoms
{
///
/// Atom Variable base class for types that are implementing `IEquatable<T>`.
///
/// The Variable type.
/// Pair of type T.
/// Event of type T.
/// Pair event of type T.
/// Function of type T and T.
[EditorIcon("atom-icon-lush")]
public abstract class EquatableAtomVariable : AtomVariable
where T : IEquatable
where P : struct, IPair
where E1 : AtomEvent
where E2 : AtomEvent
where F : AtomFunction
{
protected override bool ValueEquals(T other)
{
return (_value == null && other == null) || (_value != null && _value.Equals(other));
}
}
}