Enum Class CrimeCategory

java.lang.Object
java.lang.Enum<CrimeCategory>
com.example.cab302project.CrimeCategory
All Implemented Interfaces:
Serializable, Comparable<CrimeCategory>, Constable

public enum CrimeCategory extends Enum<CrimeCategory>
Represents the various categories of crimes handled by the system. Each category is associated with a specific display name and a CrimeCategory.Severity level.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Defines the severity levels for crime categories.

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Robbery committed with the use of a lethal weapon.
    Willful and malicious burning of property.
    Physical attack or threat of attack on another person.
    Illegal entry into a building with the intent to commit a crime.
    Crimes involving physical or emotional abuse within a domestic setting.
    Crimes involving the illegal consumption or possession of controlled substances.
    Crimes involving unauthorized marking or painting on property.
    The unlawful killing of one human being by another.
    Crimes involving the improper disposal of waste.
    Crimes involving remaining in a public place without apparent purpose.
    Crimes involving excessive or disruptive noise levels.
    Represents miscellaneous crimes not specifically categorized.
    Theft of low-value property without the use of force.
    General crimes resulting in damage to physical property.
    Crimes involving disruptive behavior in public spaces.
    Theft involving the use of force or intimidation.
    Crimes involving non-consensual sexual acts.
    The act of following or harassing a person in a threatening manner.
    Unauthorized entry onto another person's property.
    Crimes involving willful destruction or defacement of property.
    Crimes involving illegal possession or use of restricted weapons.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the human-readable name of the crime category.
    Gets the severity level associated with this crime category.
    Returns the display name of the crime category.
    Returns the enum constant of this class with the specified name.
    static CrimeCategory[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • OTHER

      public static final CrimeCategory OTHER
      Represents miscellaneous crimes not specifically categorized.
    • GRAFFITI

      public static final CrimeCategory GRAFFITI
      Crimes involving unauthorized marking or painting on property.
    • LITTERING

      public static final CrimeCategory LITTERING
      Crimes involving the improper disposal of waste.
    • NOISE

      public static final CrimeCategory NOISE
      Crimes involving excessive or disruptive noise levels.
    • LOITERING

      public static final CrimeCategory LOITERING
      Crimes involving remaining in a public place without apparent purpose.
    • VANDALISM

      public static final CrimeCategory VANDALISM
      Crimes involving willful destruction or defacement of property.
    • PUBLICDISTURBANCE

      public static final CrimeCategory PUBLICDISTURBANCE
      Crimes involving disruptive behavior in public spaces.
    • PROPERTYDAMAGE

      public static final CrimeCategory PROPERTYDAMAGE
      General crimes resulting in damage to physical property.
    • PETTYTHEFT

      public static final CrimeCategory PETTYTHEFT
      Theft of low-value property without the use of force.
    • TRESPASSING

      public static final CrimeCategory TRESPASSING
      Unauthorized entry onto another person's property.
    • DRUGUSE

      public static final CrimeCategory DRUGUSE
      Crimes involving the illegal consumption or possession of controlled substances.
    • ROBBERY

      public static final CrimeCategory ROBBERY
      Theft involving the use of force or intimidation.
    • ASSAULT

      public static final CrimeCategory ASSAULT
      Physical attack or threat of attack on another person.
    • DOMESTICABUSE

      public static final CrimeCategory DOMESTICABUSE
      Crimes involving physical or emotional abuse within a domestic setting.
    • WEAPONS

      public static final CrimeCategory WEAPONS
      Crimes involving illegal possession or use of restricted weapons.
    • STALKING

      public static final CrimeCategory STALKING
      The act of following or harassing a person in a threatening manner.
    • BREAKINGANDENTERING

      public static final CrimeCategory BREAKINGANDENTERING
      Illegal entry into a building with the intent to commit a crime.
    • SEXUALOFFENCE

      public static final CrimeCategory SEXUALOFFENCE
      Crimes involving non-consensual sexual acts.
    • ARMEDROBBERY

      public static final CrimeCategory ARMEDROBBERY
      Robbery committed with the use of a lethal weapon.
    • ARSON

      public static final CrimeCategory ARSON
      Willful and malicious burning of property.
    • HOMICIDE

      public static final CrimeCategory HOMICIDE
      The unlawful killing of one human being by another.
  • Method Details

    • values

      public static CrimeCategory[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CrimeCategory valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns the display name of the crime category.
      Overrides:
      toString in class Enum<CrimeCategory>
      Returns:
      The category name.
    • getName

      public String getName()
      Gets the human-readable name of the crime category.
      Returns:
      The category name.
    • getSeverity

      public CrimeCategory.Severity getSeverity()
      Gets the severity level associated with this crime category.
      Returns:
      The CrimeCategory.Severity level.