namespace Quadarax.Foundation.Core.QConsole.Value
{
    public class IntegerValue : AbstractValue
    {

        public IntegerValue() : base()
        {

        }

        public IntegerValue(int value) : base(typeof(int), value)
        {
        }

        protected override object ConvertStringToValue(string valueAsString)
        {
            return int.Parse(valueAsString);
        }

        public override string AsString()
        {
            return HasValue ? Get().ToString() : string.Empty;
        }
    }
}
