package com.afi.estimator.views.vo
{
    [Bindable]public class EstimatorVO extends ValueObject
    {
        
        public var dateOfBirth:Date;
        public var gender:String = "";
        public var usedNicotine:String ="";
        public var waiverPremium:String = "";
        
        public function EstimatorVO()
        {
            super();
        }
        
        public function get genderValue():Boolean{
            return getBooleanFromString(gender);
        }
        
        public function get usedNicotineValue():Boolean{
            return getBooleanFromString(usedNicotine);
        }
        
        public function get waiverPremiumValue():Boolean{
            return getBooleanFromString(waiverPremium);
        }
        
        private function getBooleanFromString(value:String):Boolean{
            if(value == "true")
                return true;
            else if(value == "false")
                return false;
            else
                return null;
        }
    }
}