예제 #1
0
        // compareTo
        public virtual Int32 CompareTo(Object object_Renamed)
        {
            Int32 difference = -1;

            ActorImpl actor = (ActorImpl)object_Renamed;

            if ((actor != null) && ((Object)this._id != null) && ((Object)actor._id != null))
            {
                difference = this._id.CompareTo(actor._id);
            }
            else
            {
                throw new SystemException("can't compare two actors this(" + this + ") and object(" + object_Renamed + ")");
            }

            return(difference);
        }
예제 #2
0
        // equals
        public override bool Equals(Object object_Renamed)
        {
            bool isEqual = false;

            if ((object_Renamed != null) && (object_Renamed is ActorImpl))
            {
                ActorImpl actor = (ActorImpl)object_Renamed;
                if (((Object)this._id == null) && ((Object)actor._id == null))
                {
                    isEqual = (this == actor);
                }
                else if (((Object)this._id != null) && ((Object)actor._id != null))
                {
                    isEqual = this._id.Equals(actor._id);
                }
            }
            return(isEqual);
        }