Class UnitParser

java.lang.Object
edu.ntnu.idatt2106_2023_06.backend.utils.UnitParser

public class UnitParser extends Object
This class contains methods to extract the amount and unit of an item from its product name. It does so using a complex regex, as well as through a lot of parsing. Furthermore, it uses the UnitType class in order to handle exceptions that the regex allows to pass through.
Author:
Trym Hamer Gudvangen
  • Constructor Details

    • UnitParser

      public UnitParser()
  • Method Details