using System;
using System.Collections.Generic;
using System.Text;

namespace FormulaEditor
{
    class StringObjectUnequalityOperation : IObjectOperation, IBinaryAcceptor
    {

        static private readonly Boolean b = false;

        static internal readonly StringObjectUnequalityOperation Object
            = new StringObjectUnequalityOperation();

        protected StringObjectUnequalityOperation()
        {
        }
        #region IObjectOperation Members

        int IObjectOperation.Arity
        {
            get { return 2; }
        }

        object IObjectOperation.this[object[] x]
        {
            get { return !("" + x[0]).Equals("" + x[1]); }
        }

        object IObjectOperation.ReturnType
        {
            get { return b; }
        }

        bool IObjectOperation.IsPowered
        {
            get { return false; }
        }

        #endregion

        #region IBinaryAcceptor Members

        IObjectOperation IBinaryAcceptor.Accept(object typeA, object typeB)
        {
            return this;
        }

        #endregion
    }
}
