@@ -0,0 +1,1449 @@
+%0Apackage net.imagej.table;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport net.imagej.Dataset;%0Aimport net.imagej.ImageJService;%0A%0Aimport org.scijava.service.Service;%0A%0A/**%0A * %7B@link Service%7D for working with %7B@link Table%7Ds.%0A *%0A * @author Alison Walter%0A */%0Apublic interface TableService extends ImageJService %7B%0A%0A%09public static final String TABLE_PROPERTY = %22tables%22;%0A%0A%09/**%0A%09 * Retrieves the %7B@link Table%7Ds attached to the given %7B@link Dataset%7D.%0A%09 *%0A%09 * @param img %7B@link Dataset%7D whose %7B@link Table%7Ds are desired%0A%09 * @return %7B@link Table%7Ds associated with %7B@code img%7D%0A%09 */%0A%09List%3CTable%3C?, ?%3E%3E getTables(final Dataset img);%0A%0A%09/**%0A%09 * Attaches the given %7B@link Table%7D to the %7B@link Dataset%7D%0A%09 *%0A%09 * @param table %7B@link Table%7D to be attached%0A%09 * @param img %7B@link Dataset%7D to attach the table to%0A%09 */%0A%09@SuppressWarnings(%22unchecked%22)%0A%09default void add(final Table%3C?, ?%3E table, final Dataset img) %7B%0A%09%09if (img.getProperties().get(TABLE_PROPERTY) != null) %7B%0A%09%09%09((List%3CTable%3C?, ?%3E%3E) img.getProperties().get(TABLE_PROPERTY)).add(table);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09final List%3CTable%3C?, ?%3E%3E t = new ArrayList%3C%3E();%0A%09%09%09t.add(table);%0A%09%09%09img.getProperties().put(TABLE_PROPERTY, t);%0A%09%09%7D%0A%09%7D%0A%0A%09/**%0A%09 * Clears any %7B@link Table%7Ds associated with the given %7B@link Dataset%7D.%0A%09 *%0A%09 * @param img the %7B@link Dataset%7D whose attached %7B@link Table%7Ds will be%0A%09 *          cleared.%0A%09 */%0A%09default void clear(final Dataset img) %7B%0A%09%09img.getProperties().put(TABLE_PROPERTY, null);%0A%09%7D%0A%0A%7D%0A

Add TableService