X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservice%2FCollectionSupport.java;h=d5cebc8644d1e4bbf73fc4c9adfd3936a2cdfa20;hb=b2bb3ff110b5bf929b6d676f0122a15a43358440;hp=8160757f9f7c934796d1bad4910714dab283ea3d;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db/src/org/simantics/db/service/CollectionSupport.java b/bundles/org.simantics.db/src/org/simantics/db/service/CollectionSupport.java index 8160757f9..d5cebc864 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/service/CollectionSupport.java +++ b/bundles/org.simantics.db/src/org/simantics/db/service/CollectionSupport.java @@ -1,49 +1,50 @@ -/******************************************************************************* - * 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.service; - -import java.util.Collection; -import java.util.List; -import java.util.Set; - -import org.simantics.db.AsyncReadGraph; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.ResourceSet; -import org.simantics.db.Statement; - - -/** - * @author Antti Villberg - */ -public interface CollectionSupport { - - public interface ConcurrentSet { - boolean add(AsyncReadGraph graph, T item); - Collection toCollection(); - } - - T createMap(Class clazz); - T createObjectResourceMap(Class clazz); - T createObjectResourceMap(Class clazz, int capacity); - Set createSet(); - Set createSet(int capacity); - List createList(); - List asSortedList(Collection set); - void sort(List list); - Collection createStatementList(); - ResourceSet getResourceSet(ReadGraph graph, Collection resources); - ResourceSet getResourceSet(ReadGraph graph, Resource ... rs); - - - -} +/******************************************************************************* + * 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.service; + +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import org.simantics.db.AsyncReadGraph; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.ResourceSet; +import org.simantics.db.Statement; + + +/** + * @author Antti Villberg + */ +public interface CollectionSupport { + + public interface ConcurrentSet { + boolean add(AsyncReadGraph graph, T item); + Collection toCollection(); + } + + T createMap(Class clazz); + T createObjectResourceMap(Class clazz); + T createObjectResourceMap(Class clazz, int capacity); + Set createSet(); + Set createSet(int capacity); + List createList(); + List createList(int capacity); + List asSortedList(Collection set); + void sort(List list); + Collection createStatementList(); + ResourceSet getResourceSet(ReadGraph graph, Collection resources); + ResourceSet getResourceSet(ReadGraph graph, Resource ... rs); + + + +}