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

namespace FormulaEditor
{
    public class LikeObjectOperation : IObjectOperation, IBinaryAcceptor
    {

        private static readonly Boolean b = false;

        public static readonly LikeObjectOperation Object =
            new LikeObjectOperation();

        protected LikeObjectOperation()
        {
        }

        #region IObjectOperation Members

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

        object IObjectOperation.this[object[] x]
        {
            get { return LikeOperation.Like(x[0], 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
}
}
