Class Alternative
- java.lang.Object
-
- io.github.oliviercailloux.j_voting.Alternative
-
public class Alternative extends Object
This class is immutable Contains an integer which corresponds to a voting possibility
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
getId()
int
hashCode()
String
toString()
static Alternative
withId(int id)
Factory method for Alternative
-
-
-
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
-
-