Ejemplo n.º 1
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(Marking rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }


            if (!(_characterSet == rhs._characterSet))
            {
                ivarsEqual = false;
            }

            if (!(rhs._characters.Length == 11))
            {
                ivarsEqual = false;
            }
            if (ivarsEqual)
            {
                for (int idx = 0; idx < 11; idx++)
                {
                    if (!(_characters[idx] == rhs._characters[idx]))
                    {
                        ivarsEqual = false;
                    }
                }
            }


            return(ivarsEqual);
        }
Ejemplo n.º 2
0
 ///<summary>
 ///characters that can be used for debugging, or to draw unique strings on the side of entities in the world
 ///</summary>
 public void setMarking(Marking pMarking)
 {
     _marking = pMarking;
 }
Ejemplo n.º 3
0
 ///<summary>
 ///characters that can be used for debugging, or to draw unique strings on the side of entities in the world
 ///</summary>
 public void setMarking(Marking pMarking)
 {
     _marking = pMarking;
 }
Ejemplo n.º 4
0
        /**
          * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
          */
        public bool equals(Marking rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
            return false;

             if( ! (_characterSet == rhs._characterSet)) ivarsEqual = false;

             for(int idx = 0; idx < 11; idx++)
             {
              if(!(_characters[idx] == rhs._characters[idx])) ivarsEqual = false;
             }

            return ivarsEqual;
        }