Commit ec5bc7f
committed
Restructure functional interfaces and related code
The Consumer*, Computer*, Function* and Inplace* interfaces have been
consolidated into umbrella container classes Consumers, Computers,
Functions and Inplaces respectively in the function subpackage. This
naming mirrors java.util.function for functional interfaces in core.
The previous Computers, Functions and Inplaces classes in the util
subpackage have been merged into the new container classes. The unary,
binary, ternary, etc., lookups have all been renamed to match (or
match1, match2, etc., in the case of Inplaces), to communicate more
uniformly that these are shorthands for matching.
The Source interface has been renamed to Producer, because it has
many fewer name clashes, and reduces semantic ambiguity.
The GenericTyped wrapper ops in the ComputerOps, FunctionOps, InplaceOps
and SourceOp classes (as well as the unused/orphaned GenericComputers,
GenericFunctions, GenericInplaces and GenericSourceOp classes) have been
consolidated into a single GenericTypedOps container class in the
function subpackage. For the moment the nested classes there are public,
but only temporarily until the op wrapping logic can be refactored out
of the OpService itself and into the same package as those classes.
To avoid name clashes across packages, the Computers, Functions and
Inplaces nested classes inside Maps and Adapt have been renamed to have
unique suffixes: Maps.Functions beame Maps.FunctionMaps, etc. These
names are merely transitional for the moment, and may change again soon.
Finally, the @parameter annotations have been removed from OpCollection
ops that do not need them, since they are inferred by default now --
although there are a few places where the @parameter annotations could
not be removed yet due to limitations in the inference behavior.1 parent 63feed2 commit ec5bc7f
116 files changed
Lines changed: 1429 additions & 5956 deletions
File tree
- src
- main/java/org/scijava
- ops
- copy
- core
- computer
- function
- inplace
- function
- math
- transform
- functional
- lift
- types
- util
- param
- struct
- test/java/org/scijava/ops
- stats
- types
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 51 | + | |
79 | 52 | | |
80 | 53 | | |
81 | 54 | | |
82 | 55 | | |
83 | 56 | | |
| 57 | + | |
84 | 58 | | |
85 | 59 | | |
86 | | - | |
87 | 60 | | |
88 | 61 | | |
89 | 62 | | |
90 | 63 | | |
91 | | - | |
92 | 64 | | |
93 | 65 | | |
| 66 | + | |
94 | 67 | | |
95 | 68 | | |
96 | 69 | | |
| |||
146 | 119 | | |
147 | 120 | | |
148 | 121 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
177 | 136 | | |
178 | 137 | | |
179 | 138 | | |
| |||
409 | 368 | | |
410 | 369 | | |
411 | 370 | | |
412 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
413 | 374 | | |
414 | 375 | | |
415 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments