fix(core): update
This commit is contained in:
parent
fe9564e37c
commit
10074b5888
@ -5,20 +5,20 @@ import { IAnswerObject } from './smartinteract.classes.smartinteract';
|
|||||||
* class AnswerBucket holds answers
|
* class AnswerBucket holds answers
|
||||||
*/
|
*/
|
||||||
export class AnswerBucket {
|
export class AnswerBucket {
|
||||||
answerMap = new plugins.lik.Objectmap<IAnswerObject>();
|
private answerMap = new plugins.lik.Objectmap<IAnswerObject>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add an answer to the bucket
|
* add an answer to the bucket
|
||||||
*/
|
*/
|
||||||
addAnswer(answerArg: IAnswerObject) {
|
public addAnswer(answerArg: IAnswerObject) {
|
||||||
this.answerMap.add(answerArg);
|
this.answerMap.add(answerArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets an answer for a specific name
|
* gets an answer for a specific name
|
||||||
*/
|
*/
|
||||||
getAnswerFor(nameArg: string) {
|
public getAnswerFor(nameArg: string) {
|
||||||
let answer = this.answerMap.find(answerArg => {
|
const answer = this.answerMap.find(answerArg => {
|
||||||
return answerArg.name === nameArg;
|
return answerArg.name === nameArg;
|
||||||
});
|
});
|
||||||
return answer ? answer.value : null;
|
return answer ? answer.value : null;
|
||||||
@ -27,7 +27,7 @@ export class AnswerBucket {
|
|||||||
/**
|
/**
|
||||||
* gets all answers as array
|
* gets all answers as array
|
||||||
*/
|
*/
|
||||||
getAllAnswers() {
|
public getAllAnswers() {
|
||||||
return this.answerMap.getArray();
|
return this.answerMap.getArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user