Class DoubleCategory

  • All Implemented Interfaces:
    Category

    public class DoubleCategory
    extends java.lang.Object
    implements Category
    A category for multi-class classification using a double as identifier.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double cat
      The value of the category.
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleCategory​(double cat)
      Creates a new category with the given value.
    • Method Summary

      Modifier and Type Method Description
      double asDouble()
      Returns a double representation of this category.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • cat

        private double cat
        The value of the category.
    • Constructor Detail

      • DoubleCategory

        public DoubleCategory​(double cat)
        Creates a new category with the given value.
        Parameters:
        cat - some boolean
    • Method Detail

      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface Category
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface Category
        Overrides:
        equals in class java.lang.Object
      • asDouble

        public double asDouble()
        Description copied from interface: Category
        Returns a double representation of this category.
        Specified by:
        asDouble in interface Category
        Returns:
        a double representation of this category.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object