Skip to content

Commit df8a770

Browse files
committed
Rephrase javadoc
Clarified the Converter javadoc, from suggestions by ctrueden.
1 parent 62d878b commit df8a770

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

src/main/java/org/scijava/convert/Converter.java

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.util.List;
3737
import java.util.Set;
3838

39+
import org.scijava.object.ObjectService;
3940
import org.scijava.plugin.HandlerPlugin;
4041
import org.scijava.plugin.Plugin;
4142

@@ -158,14 +159,26 @@ public interface Converter extends HandlerPlugin<ConversionRequest>
158159
Object convert(ConversionRequest request);
159160

160161
/**
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.
167180
*/
168-
void populateInputs(Set<Object> objects);
181+
void populateInputCandidates(Collection<Object> objects);
169182

170183
/**
171184
* @return The base {@code Class} this {@code Converter} produces as output.

0 commit comments

Comments
 (0)