Beispiel #1
0
        private void QueueInitializeSuffixes()
        {
            AddSuffix("COPY", new NoArgsSuffix <QueueValue <T> >       (() => new QueueValue <T>(this)));

            AddSuffix("PUSH", new OneArgsSuffix <T>                  (toPush => InnerEnumerable.Enqueue(toPush)));
            AddSuffix("POP", new NoArgsSuffix <T>                   (() => InnerEnumerable.Dequeue()));
            AddSuffix("PEEK", new NoArgsSuffix <T>                   (() => InnerEnumerable.Peek()));
            AddSuffix("CLEAR", new NoArgsVoidSuffix(() => InnerEnumerable.Clear()));
        }
Beispiel #2
0
 public T Pop()
 {
     return(InnerEnumerable.Dequeue());
 }