2023-10-19 19:21:17 +02:00
|
|
|
import { ContextVariableType } from "@spt-aki/context/ContextVariableType";
|
2023-03-03 16:23:46 +01:00
|
|
|
|
|
|
|
export class ContextVariable
|
|
|
|
{
|
|
|
|
private value: any;
|
|
|
|
private timestamp: Date;
|
|
|
|
private type: ContextVariableType;
|
|
|
|
|
|
|
|
constructor(value: any, type: ContextVariableType)
|
|
|
|
{
|
|
|
|
this.value = value;
|
|
|
|
this.timestamp = new Date();
|
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public getValue<T>(): T
|
|
|
|
{
|
|
|
|
return this.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public getTimestamp(): Date
|
|
|
|
{
|
|
|
|
return this.timestamp;
|
|
|
|
}
|
|
|
|
|
|
|
|
public getType(): ContextVariableType
|
|
|
|
{
|
|
|
|
return this.type;
|
|
|
|
}
|
2023-11-16 02:35:05 +01:00
|
|
|
}
|