Merge remote-tracking branch 'origin/release-0.3' into develop
commit
91a7714bb4
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/* exported
|
||||
IncrementIdGenerator
|
||||
ConstIdGenerator
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
class IncrementIdGenerator {
|
||||
constructor(startId=0) {
|
||||
this._startId = startId;
|
||||
}
|
||||
|
||||
next() {
|
||||
return this._startId++;
|
||||
}
|
||||
|
||||
reset(startId=0) {
|
||||
this._startId = startId;
|
||||
}
|
||||
}
|
||||
|
||||
class ConstIdGenerator {
|
||||
constructor(startId=-1) {
|
||||
this._startId = startId;
|
||||
}
|
||||
|
||||
next() {
|
||||
return this._startId;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue