IsEmpty

From TRCCompSci - AQA Computer Science
Revision as of 12:42, 14 November 2017 by Admin (talk | contribs)
Jump to: navigation, search
            public bool IsEmpty()
            {
                if (this.Rear == -1)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }

Pretty self explanatory, this method returns a bool indicating whether the queue instance has any values or not.