Class Match
java.lang.Object
org.episteme.social.sports.Match
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Temporal<TimeCoordinate>
Represents a discrete sports match between two teams or individuals.
Tracks scheduling status, venue, and score results.
Implements ComprehensiveIdentification to support dynamic traits and consistent identity.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMatch(Sport sport, TimeCoordinate date, Team homeTeam, Team awayTeam) Creates a new Match. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetDate()intgetId()Returns the unique identifier of this entity.getSport()Returns the traits map for this entity.getVenue()getWhen()Returns the temporal position (when) of this entity.inthashCode()booleanisTie()voidsetCompetition(Competition competition) voidsetScore(int homeScore, int awayScore) Finalizes the match result and updates status to COMPLETED.voidsetStatus(MatchStatus status) voidtoString()Methods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Field Details
-
id
-
traits
-
-
Constructor Details
-
Match
Creates a new Match.- Parameters:
sport- the sport being playeddate- the scheduled datehomeTeam- the hosting teamawayTeam- the visiting team- Throws:
NullPointerException- if any required argument is null
-
-
Method Details
-
getId
Description copied from interface:IdentifiedReturns the unique identifier of this entity.- Specified by:
getIdin interfaceIdentified<Identification>- Returns:
- the identifier
-
getTraits
Description copied from interface:ComprehensiveIdentificationReturns the traits map for this entity.- Specified by:
getTraitsin interfaceCommented- Specified by:
getTraitsin interfaceComprehensiveIdentification- Returns:
- the traits map
-
getWhen
Description copied from interface:TemporalReturns the temporal position (when) of this entity.- Specified by:
getWhenin interfaceTemporal<TimeCoordinate>- Returns:
- the temporal position.
-
getTimestamp
-
getSport
-
getDate
-
getHomeTeam
-
getAwayTeam
-
getVenue
-
getStatus
-
getHomeScore
public int getHomeScore() -
getAwayScore
public int getAwayScore() -
getCompetition
-
setVenue
-
setStatus
-
setCompetition
-
setScore
public void setScore(int homeScore, int awayScore) Finalizes the match result and updates status to COMPLETED. -
getWinner
-
isTie
public boolean isTie() -
toString
-
equals
-
hashCode
-