A habitual offender, repeat offender, or career criminal is a person convicted of a crime who was previously convicted of other crimes. Various state and jurisdictions may have laws targeting habitual offenders, and specifically providing for enhanced or exemplary punishments or other sanctions. They are designed to counter criminal recidivism by physical incapacitation via imprisonment. The nature, scope, and type of habitual offender statutes vary, but generally they apply when a person has been convicted twice for various crimes. Some codes may differentiate between classes of crimes (for example, some codes only deal with violent crime) and the length of time between convictions. Usually, the sentence is greatly enhanced; in some circumstances, it may be substantially more than the maximum sentence for the crime. Habitual offender laws may provide for mandatory sentencing—in which a minimum sentence must be imposed, or may allow judicial discretion in allowing the court to determine a proper sentence. In Australia, various states and territories have adopted habitual offender legislation. Under the provisions of the Habitual Criminals Act 1957 (NSW), an offender can be designated a habitual criminal and given an additional protective sentence of between five and 14 years' imprisonment. The offender must be at least 25 years of age, have served sentences for at least two indictable offenses, and the sentencing judge must decide that preventive detention is required to protect the public. An offender who is at least 17 years of age and has been convicted of at least two violent or sexual offences can be declared a dangerous offender and detained indeterminately. A judge must consider the potential of future harm that could be caused by offenders, the circumstances of their offenses, medical and psychiatric opinion and any other matters of relevance. The decision passed by the court is not reviewable; the indeterminate sentence(s) commence upon the expiration of any determinate sentence imposed and release is by way of an order from the Supreme Court.