Skip to content

Commit 569bfc1

Browse files
committed
DefaultOpEnvironment: data structure comments
1 parent 2dc1641 commit 569bfc1

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎scijava/scijava-ops/src/main/java/org/scijava/ops/impl/DefaultOpEnvironment.java‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,25 @@ public class DefaultOpEnvironment extends AbstractContextual implements OpEnviro
100100
private TypeService typeService;
101101

102102
/**
103-
* Map to collect all aliases for a specific op. All aliases will map to one
104-
* canonical name of the op which is defined as the first one.
103+
* Data structure storing all known Ops, grouped by name. This reduces the
104+
* search size for any Op request to the number of known Ops with the name
105+
* given in the request.
105106
*/
106107
private Map<String, Set<OpInfo>> opDirectory;
107108

109+
/**
110+
* Map containing pairs of {@link OpRef} op requests and the {@code Op}s that
111+
* matched those requests. Used to quickly return Ops when an {@OpRef} matches
112+
* a previous call.
113+
*
114+
* @see OpRef#equals(Object)
115+
*/
108116
private Map<OpRef, Object> opCache;
109117

118+
/**
119+
* Data structure storing all known {@link OpWrapper}s. Each {@link OpWrapper}
120+
* is retrieved by providing the {@link Class} that it is able to wrap.
121+
*/
110122
private Map<Class<?>, OpWrapper<?>> wrappers;
111123

112124
public DefaultOpEnvironment(final Context context) {

0 commit comments

Comments
 (0)