@andreabiagini5/applicazioni-e-servizi-web-project
Version:
Project for Applicazioni e Servizi Web.
28 lines • 995 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MatchmakingCandidateFactory = void 0;
class MatchmakingCandidateFactory {
}
exports.MatchmakingCandidateFactory = MatchmakingCandidateFactory;
MatchmakingCandidateFactory.create = (username, rating, requestTime) => new MatchmakingCandidateImpl(username, rating, requestTime);
class MatchmakingCandidateImpl {
constructor(username, rating, requestTime) {
this._username = username;
this._rating = rating;
this._requestTime = requestTime !== null && requestTime !== void 0 ? requestTime : new Date();
}
get username() {
return this._username;
}
get rating() {
return this._rating;
}
get requestTime() {
return this._requestTime;
}
// TODO UPDATE THIS WHEN THE USERS WILL NOT BE IDENTIFIED BY USERNAME
equals(other) {
return this._username === other.username;
}
}
//# sourceMappingURL=MatchmakingCandidate.js.map