using System.Collections.Generic;
using System.Linq;

namespace NBC
{
    public class FsmTransmit
    {
        private readonly List<object> _queue = new List<object>();

        public List<object> AllParam => _queue;

        public void Add(object o)
        {
            _queue.Add(o);
        }

        public void AddRange(FsmTransmit transmit)
        {
            _queue.AddRange(transmit.AllParam);
        }

        public void AddRange(IEnumerable<object> o)
        {
            _queue.AddRange(o);
        }

        public object Get(int index)
        {
            if (index >= 0 && index < _queue.Count)
            {
                return _queue[index];
            }

            return null;
        }

        public void Clear()
        {
            _queue.Clear();
        }
    }
}