NewspaperEnum.java

package edu.ntnu.idi.idatt.model.enums;

import edu.ntnu.idi.idatt.model.market.Newspaper;

/**
 * Newspaper enum.
 * 
 * <p>
 * Creates static events that can occur within Newspaper.
 * </p>
 * 
 * {@link Newspaper}
 */
public enum NewspaperEnum {
  NEW_PRODUCT(
      "New product announced!",
      "The company revealed plans for a major new product launch next week!",
      0.08,
      0.02),

  QUARTER(
      "Quarterly earnings released!",
      "The company's quarterly earnings report exceeded analyst expectations!",
      0.05,
      0.03),

  DISASTER(
      "Natural disaster struck!",
      "A natural disaster disrupted several of the company's factories!",
      -0.08,
      0.08),

  RESEARCH_FUNDS(
      "Government research funding!",
      "The government approved additional funding for the company's research division!",
      0.04,
      0.04),

  FRAUD(
      "Fraud investigation!",
      "The company's CEO is under investigation for potential fraud!",
      -0.05,
      0.12),

  NEW_PARTNERSHIP(
      "Major partnership formed!",
      "The company announced a strategic partnership with another corporation!",
      0.07,
      0.03),

  PRODUCT_RECALL(
      "Product recall issued!",
      "The company recalled one of its products over safety concerns!",
      -0.08,
      0.07),

  SUPPLY_SHORTAGE(
      "Supply shortage reported!",
      "Global supply shortages are slowing the company's production!",
      -0.06,
      0.05),

  FACTORY_EXPANSION(
      "Factory expansion planned!",
      "The company announced plans to expand manufacturing capacity!",
      0.06,
      0.02),

  PATENT_APPROVED(
      "Patent approved!",
      "The company secured a major technology patent approval!",
      0.09,
      0.03),

  PATENT_DENIED(
      "Patent denied!",
      "Regulators denied one of the company's patent applications!",
      -0.08,
      0.05),

  MARKET_MANIPULATION_INVESTIGATION(
      "Market investigation launched!",
      "Regulators opened a market manipulation investigation into the company!",
      -0.03,
      0.15),
  NONE_EVENT(
      "",
      "",
      0,
      0);

  private final String title;
  private final String description;
  private final double trend;
  private final double volatility; // How violently the price moves factor

  /**
   * Constructor for NewspaperEnum
   */
  NewspaperEnum(String title, String description, double trend, double volatility) {
    this.title = title;
    this.description = description;
    this.trend = trend;
    this.volatility = volatility;
  }

  /**
   * Getter for title
   * 
   * @return String;
   */
  public String getTitle() {
    return title;
  }

  /**
   * Getter for description
   * 
   * @return String;
   */
  public String getDescription() {
    return description;
  }

  /**
   * Getter for trend
   * 
   * @return double;
   */
  public double getTrend() {
    return trend;
  }

  /**
   * Getter for volatility
   * 
   * @return double;
   */
  public double getVolatility() {
    return volatility;
  }

}