Package it.unibo.ds.chainvote.facade
Class ElectionFacadeImpl
java.lang.Object
it.unibo.ds.chainvote.facade.ElectionFacadeImpl
- All Implemented Interfaces:
ElectionFacade
An
ElectionFacade implementation.-
Constructor Summary
ConstructorsConstructorDescriptionElectionFacadeImpl(it.unibo.ds.chainvote.elections.Election election, it.unibo.ds.chainvote.elections.ElectionInfo info) Creates a newElectionFacadeinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleReturn theElectionFacade's affluence.Return theElectionFacade's endLocalDateTime.getGoal()Return theElectionFacade's goal.getId()Return theElectionFacade's electionId.Allows access toMaprepresenting results of theElection.Return theElectionFacade's startLocalDateTime.Return theElectionStatusof theElectionFacade.inthashCode()
-
Constructor Details
-
ElectionFacadeImpl
public ElectionFacadeImpl(it.unibo.ds.chainvote.elections.Election election, it.unibo.ds.chainvote.elections.ElectionInfo info) Creates a newElectionFacadeinstance.- Parameters:
election- theElectioninstance.info- theElectionInfoinstance.
-
-
Method Details
-
getStatus
Description copied from interface:ElectionFacadeReturn theElectionStatusof theElectionFacade.- Specified by:
getStatusin interfaceElectionFacade- Returns:
- the
ElectionStatus.
-
getId
Description copied from interface:ElectionFacadeReturn theElectionFacade's electionId.- Specified by:
getIdin interfaceElectionFacade- Returns:
- the
ElectionFacadeid.
-
getGoal
Description copied from interface:ElectionFacadeReturn theElectionFacade's goal.- Specified by:
getGoalin interfaceElectionFacade- Returns:
- the
ElectionFacadegoal.
-
getStartDate
Description copied from interface:ElectionFacadeReturn theElectionFacade's startLocalDateTime.- Specified by:
getStartDatein interfaceElectionFacade- Returns:
- the
ElectionFacadestart date.
-
getEndDate
Description copied from interface:ElectionFacadeReturn theElectionFacade's endLocalDateTime.- Specified by:
getEndDatein interfaceElectionFacade- Returns:
- the
ElectionFacadeend date.
-
getAffluence
public double getAffluence()Description copied from interface:ElectionFacadeReturn theElectionFacade's affluence.- Specified by:
getAffluencein interfaceElectionFacade- Returns:
- the
ElectionFacadeaffluence.
-
getResults
Description copied from interface:ElectionFacadeAllows access toMaprepresenting results of theElection.- Specified by:
getResultsin interfaceElectionFacade- Returns:
- the
Maprepresenting the results.
-
equals
-
hashCode
public int hashCode()
-