using System.Text;

namespace PinyinModel
{
    internal class PinyinSequence
    {
        string[] pinyin_sequence;
        int from, to;

        public PinyinSequence(string[] pinyin_sequence, int from, int to)
        {
            this.pinyin_sequence = pinyin_sequence;
            this.from = from;
            this.to = to;
        }

        public string[] Pinyins
        {
            get { return pinyin_sequence; }
        }

        public int From
        {
            get { return from; }
        }

        public int To
        {
            get { return to; }
        }

        public override string ToString()
        {
            StringBuilder buffer = new StringBuilder();
            foreach (string pinyin in this.pinyin_sequence)
            {
                buffer.Append(pinyin);
                buffer.Append(' ');
            }
            buffer.Remove(buffer.Length - 1, 1);
            return buffer.ToString();
        }
    }
}
