X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fprocore%2Fcluster%2FTableIntSet2.java;fp=bundles%2Forg.simantics.db.procore%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fprocore%2Fcluster%2FTableIntSet2.java;h=a4d615ae5d2f4360efbc4fa2855e5c54173fdeb9;hp=8110d1a49ee01e6681320da43cf315cd494806b9;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/TableIntSet2.java b/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/TableIntSet2.java index 8110d1a49..a4d615ae5 100644 --- a/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/TableIntSet2.java +++ b/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/TableIntSet2.java @@ -1,60 +1,60 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.procore.cluster; - -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.impl.ClusterI; -import org.simantics.db.impl.IntAllocatorI; -import org.simantics.db.impl.Modifier; - -final class TableIntSet2 { - public static final int HeaderSize = IntHash.HeaderSize; - static int create(int[] keys, int vals[], IntAllocatorI allocator) { - return IntHash2.create(keys, vals, allocator); - } - - /** - * @param table - * @param base - * @param object - * @param allocator - * @return base if object was actually added. Base can be new if new memory is allocated. - */ - static int addInt(int[] table, int base, int key, int val, IntAllocatorI allocator) { - return IntHash2.add(table, base, key, val, allocator); - } - - static boolean removeInt(int[] table, int base, int key) { - return IntHash2.remove(table, base, key); - } - - static int getSize(int[] table, int base) { - return IntHash2.getUsedSize(table, base); - } - - static int getAllocatedSize(int[] table, int base) { - return IntHash2.getAllocatedSize(table, base); - } - - static boolean foreachInt(int[] table, int base - , ClusterI.PredicateProcedure procedure, Context context, Modifier modifier) throws DatabaseException { - return IntHash2.foreachInt(table, base, procedure, context, modifier); - } - - static boolean contains(int[] table, int base, int key) { - return IntHash2.contains(table, base, key); - } - static int get(int[] table, int base, int key) { - return IntHash2.get(table, base, key); - } -} - +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db.procore.cluster; + +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.impl.ClusterI; +import org.simantics.db.impl.IntAllocatorI; +import org.simantics.db.impl.Modifier; + +final class TableIntSet2 { + public static final int HeaderSize = IntHash.HeaderSize; + static int create(int[] keys, int vals[], IntAllocatorI allocator) { + return IntHash2.create(keys, vals, allocator); + } + + /** + * @param table + * @param base + * @param object + * @param allocator + * @return base if object was actually added. Base can be new if new memory is allocated. + */ + static int addInt(int[] table, int base, int key, int val, IntAllocatorI allocator) { + return IntHash2.add(table, base, key, val, allocator); + } + + static boolean removeInt(int[] table, int base, int key) { + return IntHash2.remove(table, base, key); + } + + static int getSize(int[] table, int base) { + return IntHash2.getUsedSize(table, base); + } + + static int getAllocatedSize(int[] table, int base) { + return IntHash2.getAllocatedSize(table, base); + } + + static boolean foreachInt(int[] table, int base + , ClusterI.PredicateProcedure procedure, Context context, Modifier modifier) throws DatabaseException { + return IntHash2.foreachInt(table, base, procedure, context, modifier); + } + + static boolean contains(int[] table, int base, int key) { + return IntHash2.contains(table, base, key); + } + static int get(int[] table, int base, int key) { + return IntHash2.get(table, base, key); + } +} +