Package FLOTF

Class PartInfo


  • public class PartInfo
    extends java.lang.Object
    This class stores the user-entered and parsed/scraped information about the part
    Author:
    Bernard Chan, Sonali Loomba
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static NSN currentNSN
      The current nsn as a NSN object
      private static Part currentPart
      The current part as a Part object
      private static java.lang.String JCN
      User-entered JCN
      private static java.lang.String quantity
      User-entered quantity
    • Constructor Summary

      Constructors 
      Constructor Description
      PartInfo()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addUserData​(java.lang.String jcn, java.lang.String quantity)
      Stores the user-entered data in JCN and quantity
      static NSN getCurrentNSN()
      Gets the current NSN
      static Part getCurrentPart()
      Gets the current part
      static java.lang.String getJCN()
      Gets the user-entered JCN
      static java.lang.String getQuantity()
      Gets the user-entered quantity
      static void removePart()
      Clears the fields of PartInfo
      static void setCurrentNSN​(NSN currentNSN)
      Sets the current NSN
      static void setCurrentPart​(Part currentPart)
      Sets the current part
      static void setJCN​(java.lang.String JCN)
      Sets the current JCN
      static void setQuantity​(java.lang.String quantity)
      Sets the current quantity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • currentPart

        private static Part currentPart
        The current part as a Part object
      • JCN

        private static java.lang.String JCN
        User-entered JCN
      • quantity

        private static java.lang.String quantity
        User-entered quantity
      • currentNSN

        private static NSN currentNSN
        The current nsn as a NSN object
    • Constructor Detail

      • PartInfo

        public PartInfo()
    • Method Detail

      • addUserData

        public static void addUserData​(java.lang.String jcn,
                                       java.lang.String quantity)
        Stores the user-entered data in JCN and quantity
        Parameters:
        jcn - the jcn String to be added
        quantity - the quantity String to be added
      • removePart

        public static void removePart()
        Clears the fields of PartInfo
      • getCurrentNSN

        public static NSN getCurrentNSN()
        Gets the current NSN
        Returns:
        an NSN object specifying the current NSN
      • getCurrentPart

        public static Part getCurrentPart()
        Gets the current part
        Returns:
        a Part object specifying the current part
      • getJCN

        public static java.lang.String getJCN()
        Gets the user-entered JCN
        Returns:
        a String specifying the user-entered JCN
      • getQuantity

        public static java.lang.String getQuantity()
        Gets the user-entered quantity
        Returns:
        a String specifying the user-entered quantity
      • setCurrentPart

        public static void setCurrentPart​(Part currentPart)
        Sets the current part
        Parameters:
        currentPart - the current part
      • setJCN

        public static void setJCN​(java.lang.String JCN)
        Sets the current JCN
        Parameters:
        JCN - the current JCN
      • setQuantity

        public static void setQuantity​(java.lang.String quantity)
        Sets the current quantity
        Parameters:
        quantity - the current quantity
      • setCurrentNSN

        public static void setCurrentNSN​(NSN currentNSN)
        Sets the current NSN
        Parameters:
        currentNSN - the current NSN