-package org.simantics.db.impl;\r
-\r
-public class TableIntAllocatorAdapter implements IntAllocatorI {\r
- private Table<int[]> table;\r
- public TableIntAllocatorAdapter(Table<int[]> table) {\r
- this.table = table;\r
- }\r
- @Override\r
- public int allocate(int size) {\r
- int tableIndex = table.createNewElement(size);\r
- return table.checkIndexAndGetRealIndex(tableIndex, size);\r
- }\r
- @Override\r
- public int[] getTable() {\r
- return table.getTable();\r
- }\r
-}\r
+package org.simantics.db.impl;
+
+public class TableIntAllocatorAdapter implements IntAllocatorI {
+ private Table<int[]> table;
+ public TableIntAllocatorAdapter(Table<int[]> table) {
+ this.table = table;
+ }
+ @Override
+ public int allocate(int size) {
+ int tableIndex = table.createNewElement(size);
+ return table.checkIndexAndGetRealIndex(tableIndex, size);
+ }
+ @Override
+ public int[] getTable() {
+ return table.getTable();
+ }
+}