unity-atoms/Packages/Core/Runtime/Variables/EquatableAtomVariable.cs
Adam Ramberg c3bc59259f More WIP
2020-03-02 02:26:06 +01:00

18 lines
488 B
C#

using System;
namespace UnityAtoms
{
public abstract class EquatableAtomVariable<T, P, E1, E2, F> : AtomVariable<T, P, E1, E2, F>
where T : IEquatable<T>
where P : struct, IPair<T>
where E1 : AtomEvent<T>
where E2 : AtomEvent<P>
where F : AtomFunction<T, T>
{
protected override bool ValueEquals(T other)
{
return (_value == null && other == null) || (_value != null && _value.Equals(other));
}
}
}