Cleaned up git
[iotcloud.git] / src / js / iotjs / orig / slotindexer.js
diff --git a/src/js/iotjs/orig/slotindexer.js b/src/js/iotjs/orig/slotindexer.js
deleted file mode 100644 (file)
index da738ff..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-class SlotIndexer{
-       constructor(_updates,_buffer){
-               // updates is an array of slot objects
-               // buffer is an instanceof slotbuffer constructor object in slotbuffer.js
-               this.updates = _updates;
-               if(_buffer && _buffer instanceof SlotBuffer){
-                       this.buffer = _buffer;
-               }else{
-                       throw new Error("Argument error Buffer should be an instance of SlotBuffer");
-               }
-               this.firstslotseqnum = this.updates[0].getSequenceNumber();     
-       }
-
-       getSlot(seqnum){
-               if(seqnum >= this.firstslotseqnum){
-                       var offset = seqnum - this.firstslotseqnum;
-                       if(offset >= this.updates.length){
-                               throw new Error('Invalid Slot Sequence Number Reference');
-                       }else{
-                               return this.updates[offset];
-                       }
-               }else{
-                       return this.buffer.getSlot(seqnum);
-               }
-       }
-
-}
\ No newline at end of file