X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Faccessor%2FMapAccessor.java;h=782f3f84c8b9d8bc5604521cadff704fe5d1be0b;hb=refs%2Fchanges%2F38%2F238%2F2;hp=7c6cc54853745b775ac547898faa2bb36e7ae23f;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/MapAccessor.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/MapAccessor.java index 7c6cc5485..782f3f84c 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/MapAccessor.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/MapAccessor.java @@ -1,31 +1,31 @@ -/******************************************************************************* - * Copyright (c) 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 - *******************************************************************************/ +/******************************************************************************* + * Copyright (c) 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.databoard.accessor; -import java.util.Map; - -import org.simantics.databoard.accessor.error.AccessorConstructionException; -import org.simantics.databoard.accessor.error.AccessorException; -import org.simantics.databoard.accessor.impl.MapAccessorIterator; -import org.simantics.databoard.binding.ArrayBinding; -import org.simantics.databoard.binding.Binding; -import org.simantics.databoard.binding.error.BindingException; -import org.simantics.databoard.type.MapType; - -/** - * Map accessor is an interface to value container of map type - * - * @see MapAccessorIterator iterator helper class - * @author Toni Kalajainen +import java.util.Map; + +import org.simantics.databoard.accessor.error.AccessorConstructionException; +import org.simantics.databoard.accessor.error.AccessorException; +import org.simantics.databoard.accessor.impl.MapAccessorIterator; +import org.simantics.databoard.binding.ArrayBinding; +import org.simantics.databoard.binding.Binding; +import org.simantics.databoard.binding.error.BindingException; +import org.simantics.databoard.type.MapType; + +/** + * Map accessor is an interface to value container of map type + * + * @see MapAccessorIterator iterator helper class + * @author Toni Kalajainen */ public interface MapAccessor extends Accessor { @@ -101,27 +101,27 @@ public interface MapAccessor extends Accessor { * @throws AccessorException */ void remove(Binding keyBinding, Object key) throws AccessorException; - - /** - * Remove all values between an two keys. - * - * If there is an existing accessor, it becomes invalid. - * - * @param keyBinding - * @param startKey start key, inclusive - * @param endKey end key, exclusive - * @throws AccessorException - */ -// void removeRange(Binding keyBinding, Object startKey, Object endKey) throws AccessorException; - - /** - * Clear all entries. - * - * If there is an accessor to a removed container, it becomes invalid. - * - * @throws AccessorException - */ - void clear() throws AccessorException; + + /** + * Remove all values between an two keys. + * + * If there is an existing accessor, it becomes invalid. + * + * @param keyBinding + * @param startKey start key, inclusive + * @param endKey end key, exclusive + * @throws AccessorException + */ +// void removeRange(Binding keyBinding, Object startKey, Object endKey) throws AccessorException; + + /** + * Clear all entries. + * + * If there is an accessor to a removed container, it becomes invalid. + * + * @throws AccessorException + */ + void clear() throws AccessorException; /** * Put entries from a map. Replaces any possible existing entry. @@ -164,39 +164,39 @@ public interface MapAccessor extends Accessor { * @throws AccessorException */ void getAll(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException; - - /** - * Count the number of entries between two keyes - * @param keyBinding - * @param from - * @param fromInclusive - * @param end - * @param endInclusive - * @return number of entries in range - * @throws AccessorException - */ - int count(Binding keyBinding, Object from, boolean fromInclusive, Object end, boolean endInclusive) throws AccessorException; - - /** - * Read a range of entries - * - * @param keyBinding - * @param from - * @param fromInclusive - * @param end - * @param endInclusive - * @param keyArrayBinding - * @param keysArray - * @param valueArrayBinding - * @param valueArray - * @param resultLimit maximum number of entries to read, -1 for no limit - * @return the number of entries read - * @throws AccessorException - */ - int getEntries(Binding keyBinding, Object from, boolean fromInclusive, Object end, boolean endInclusive, - ArrayBinding keyArrayBinding, Object keysArray, - ArrayBinding valueArrayBinding, Object valueArray, - int resultLimit) throws AccessorException; + + /** + * Count the number of entries between two keyes + * @param keyBinding + * @param from + * @param fromInclusive + * @param end + * @param endInclusive + * @return number of entries in range + * @throws AccessorException + */ + int count(Binding keyBinding, Object from, boolean fromInclusive, Object end, boolean endInclusive) throws AccessorException; + + /** + * Read a range of entries + * + * @param keyBinding + * @param from + * @param fromInclusive + * @param end + * @param endInclusive + * @param keyArrayBinding + * @param keysArray + * @param valueArrayBinding + * @param valueArray + * @param resultLimit maximum number of entries to read, -1 for no limit + * @return the number of entries read + * @throws AccessorException + */ + int getEntries(Binding keyBinding, Object from, boolean fromInclusive, Object end, boolean endInclusive, + ArrayBinding keyArrayBinding, Object keysArray, + ArrayBinding valueArrayBinding, Object valueArray, + int resultLimit) throws AccessorException; /** * Get all keys in order @@ -214,7 +214,7 @@ public interface MapAccessor extends Accessor { * @return an array of values * @throws AccessorException */ - Object[] getValues(Binding valueBinding) throws AccessorException; + Object[] getValues(Binding valueBinding) throws AccessorException; /** * Get an accessor to a value. It becomes invalid if the entry is