Class ParamSet


  • public class ParamSet
    extends java.lang.Object
    the ParamSet class is used to keep track of all of the items in a menu it can be queried to get the current values of the menu values and labels can also be loaded as arrays of strings, allowing for the menuset to be used without a gui
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.HashMap<java.lang.String,​java.lang.Integer> labels  
      java.util.ArrayList<java.lang.String> vals  
    • Constructor Summary

      Constructors 
      Constructor Description
      ParamSet()  
      ParamSet​(java.lang.String[] labelArr, java.lang.String[] vals)  
    • Method Summary

      Modifier and Type Method Description
      MenuItem AddGuiMenuItem​(MenuItem addMe)
      adds a new gui menu item to the set
      boolean GetBool​(java.lang.String label)
      gets the boolean value from the set with the specified label
      double GetDouble​(java.lang.String label)
      gets the double value from the set with the specified label
      int GetInt​(java.lang.String label)
      gets the integer value from the set with the specified label
      java.lang.String GetString​(java.lang.String label)
      gets the string value from the set with the specified label
      java.lang.String[] LabelStrings()
      returns the labels in the set as an array of strings
      void Set​(java.lang.String label, java.lang.String value)
      sets the value at the specified label to the specified value
      void SetGui​(java.lang.String label, java.lang.String val)
      sets the gui component with the provided label to val
      void SetGuiAll​(java.lang.String[] vals)
      set all gui values with the vals array provided
      void SetLabels​(java.lang.String[] labels)
      sets all labels with the labels array provided
      void SetParamChangeAction​(ParamSetChangeAction ChangeAction)  
      void SetVals​(java.lang.String[] vals)
      sets all values with the vals array provided
      void SetValsAndLabels​(java.lang.String[] labels, java.lang.String[] vals)
      sets both the vals and labels with the arrays provided
      java.lang.String[] ValueStrings()
      returns the values in the set as an array of strings
      • Methods inherited from class java.lang.Object

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

      • labels

        public java.util.HashMap<java.lang.String,​java.lang.Integer> labels
      • vals

        public java.util.ArrayList<java.lang.String> vals
    • Constructor Detail

      • ParamSet

        public ParamSet()
      • ParamSet

        public ParamSet​(java.lang.String[] labelArr,
                        java.lang.String[] vals)
        Parameters:
        labelArr - array of all label names
        vals - array of values, must be in the same order as the labels array
    • Method Detail

      • GetBool

        public boolean GetBool​(java.lang.String label)
        gets the boolean value from the set with the specified label
      • GetInt

        public int GetInt​(java.lang.String label)
        gets the integer value from the set with the specified label
      • GetDouble

        public double GetDouble​(java.lang.String label)
        gets the double value from the set with the specified label
      • GetString

        public java.lang.String GetString​(java.lang.String label)
        gets the string value from the set with the specified label
      • SetVals

        public void SetVals​(java.lang.String[] vals)
        sets all values with the vals array provided
      • Set

        public void Set​(java.lang.String label,
                        java.lang.String value)
        sets the value at the specified label to the specified value
      • SetLabels

        public void SetLabels​(java.lang.String[] labels)
        sets all labels with the labels array provided
      • SetValsAndLabels

        public void SetValsAndLabels​(java.lang.String[] labels,
                                     java.lang.String[] vals)
        sets both the vals and labels with the arrays provided
      • AddGuiMenuItem

        public MenuItem AddGuiMenuItem​(MenuItem addMe)
        adds a new gui menu item to the set
      • SetGuiAll

        public void SetGuiAll​(java.lang.String[] vals)
        set all gui values with the vals array provided
      • SetGui

        public void SetGui​(java.lang.String label,
                           java.lang.String val)
        sets the gui component with the provided label to val
      • ValueStrings

        public java.lang.String[] ValueStrings()
        returns the values in the set as an array of strings
      • LabelStrings

        public java.lang.String[] LabelStrings()
        returns the labels in the set as an array of strings