|
36 | 36 | import java.util.List; |
37 | 37 | import java.util.Set; |
38 | 38 |
|
| 39 | +import org.scijava.object.ObjectService; |
39 | 40 | import org.scijava.plugin.HandlerPlugin; |
40 | 41 | import org.scijava.plugin.Plugin; |
41 | 42 |
|
@@ -158,14 +159,26 @@ public interface Converter extends HandlerPlugin<ConversionRequest> |
158 | 159 | Object convert(ConversionRequest request); |
159 | 160 |
|
160 | 161 | /** |
161 | | - * Fills the given {@code Object} set with the potential input types known to |
162 | | - * this {@code Converter}. |
163 | | - * |
164 | | - * @param objects A pre-allocated {@link Set} of potential input objects. |
165 | | - * Input objects known to this {@code Converter} will be added to |
166 | | - * this set. |
| 162 | + * Populates the given collection with objects which are known to exist, and |
| 163 | + * which are usable as inputs for this converter. |
| 164 | + * <p> |
| 165 | + * That is: each such object added to the collection would return {@code true} |
| 166 | + * if queried with {@code converter.canConvert(object)}, and hence would |
| 167 | + * produce an output of type {@link #getOutputType()} if passed to |
| 168 | + * {@code converter.convert(object)}. |
| 169 | + * </p> |
| 170 | + * <p> |
| 171 | + * The means by which "known objects" are determined is implementation |
| 172 | + * dependent, although the most typical use case is to query the |
| 173 | + * {@link ObjectService} for known objects of type {@link #getInputType()}, |
| 174 | + * and return those. But other behaviors are possible, depending on the |
| 175 | + * converter implementation. |
| 176 | + * </p> |
| 177 | + * |
| 178 | + * @param objects an initialized collection into which appropriate objects |
| 179 | + * will be inserted. |
167 | 180 | */ |
168 | | - void populateInputs(Set<Object> objects); |
| 181 | + void populateInputCandidates(Collection<Object> objects); |
169 | 182 |
|
170 | 183 | /** |
171 | 184 | * @return The base {@code Class} this {@code Converter} produces as output. |
|
0 commit comments