the legislature is primarily the judge of the necessity of an enactment or of any of its provisions , and every presumption is in favor of its validity , and though the court may hold views inconsistent with the wisdom of the law , it may not annul the legislation if not palpably in excess of the legislative power .