Class Alternative


  • public class Alternative
    extends Object
    This class is immutable Contains an integer which corresponds to a voting possibility
    • Method Detail

      • withId

        public static Alternative withId​(int id)
        Factory method for Alternative
        Parameters:
        id - not null
        Returns:
        new Alternative
      • getId

        public int getId()
        Returns:
        the id of the Alternative
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object