All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.app.core.model.scenario.strategy.model.ts Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
import { areEquals, Equals } from '@shared/equals';
import { cloneAsPossible, Clonable } from '@shared/clonable';

export class Strategy implements Equals, Clonable {

  constructor(
    public type: string,
    public parameters: Object
  ) {
  }

  public equals(obj: Strategy): boolean {
    return obj && areEquals(this.type, obj.type) && areEquals(this.parameters, obj.parameters);
  }

  public clone(): Strategy {
    return new Strategy(
      cloneAsPossible(this.type),
      cloneAsPossible(this.parameters)
    );
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy