Class ClassMapper


  • public class ClassMapper
    extends java.lang.Object
    Class mapper used for predictions of String objects which are internally predicted by time series classifiers as ints.
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassMapper​(java.util.List<java.lang.String> classValues)
      Constructor using a list of String value to realize the mapping
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getClassValues()
      Getter for the classValues.
      java.lang.String map​(int index)
      Maps an integer value to a string based on the position index in the classValues.
      int map​(java.lang.String value)
      Maps a String value to an integer value based on the value's position in the classValues.
      void setClassValues​(java.util.List<java.lang.String> classValues)
      Setter for the classValues.
      • Methods inherited from class java.lang.Object

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

      • ClassMapper

        public ClassMapper​(java.util.List<java.lang.String> classValues)
        Constructor using a list of String value to realize the mapping
        Parameters:
        classValues - String values used for the mapping. The values are identified by the given indices in the given list
    • Method Detail

      • map

        public int map​(java.lang.String value)
        Maps a String value to an integer value based on the value's position in the classValues.
        Parameters:
        value - The value to be looked up
        Returns:
        Returns the mapped index or -1 if not stored
      • map

        public java.lang.String map​(int index)
        Maps an integer value to a string based on the position index in the classValues.
        Parameters:
        index - The index used for the lookup
        Returns:
        Returns the given string at the position index
      • getClassValues

        public java.util.List<java.lang.String> getClassValues()
        Getter for the classValues.
        Returns:
        Returns the stored class values
      • setClassValues

        public void setClassValues​(java.util.List<java.lang.String> classValues)
        Setter for the classValues.
        Parameters:
        classValues - The class values to be set.