File tree Expand file tree Collapse file tree 5 files changed +21
-49
lines changed
src/main/java/net/imglib2 Expand file tree Collapse file tree 5 files changed +21
-49
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,17 @@ default T firstElement() // TODO: fix places where it is not necessary to implem
118118 return iterator ().next ();
119119 }
120120
121- /*
122- * NB: We cannot have a default implementation here because of
123- * https://bugs.openjdk.org/browse/JDK-7120669
121+ /**
122+ * Get an instance of {@code T}.
123+ * <p>
124+ * It should not be assumed that the returned {@code T} instance is an
125+ * independent copy. In particular, repeated calls to {@code getType()} may
126+ * return the same instance.
127+ * <p>
128+ * The default implementation returns {@link #firstElement}. Derived classes
129+ * may choose different implementations for improved performance.
130+ *
131+ * @return an instance of {@code T}
124132 */
125133 @ Override
126134 default T getType ()
Original file line number Diff line number Diff line change @@ -182,17 +182,8 @@ default T getAt( final Localizable position )
182182 }
183183
184184 /*
185- * Get an instance of {@code T}.
186- * <p>
187- * It should not be assumed that the returned {@code T} instance is an
188- * independent copy. In particular, repeated calls to {@code getType()} may
189- * return the same instance.
190- * <p>
191- * The default implementation queries the value at the default coordinate of
192- * {@link RandomAccessible#randomAccess()}. Derived classes may choose
193- * different implementations for improved performance.
194- *
195- * @return an instance of {@code T}
185+ * NB: We cannot have a default implementation here because of
186+ * https://bugs.openjdk.org/browse/JDK-7120669
196187 */
197188// @Override
198189// default T getType()
Original file line number Diff line number Diff line change 6565public interface RandomAccessibleInterval < T > extends RandomAccessible < T >, Interval
6666{
6767 /*
68- * Get an instance of {@code T}.
69- * <p>
70- * It should not be assumed that the returned {@code T} instance is an
71- * independent copy. In particular, repeated calls to {@code getType()} may
72- * return the same instance.
73- * <p>
74- * The default implementation queries the value at the min coordinate of
75- * this interval. Derived classes may choose different implementations for
76- * improved performance.
77- *
78- * @return an instance of {@code T}
68+ * NB: We cannot have a default implementation here because of
69+ * https://bugs.openjdk.org/browse/JDK-7120669
7970 */
8071// @Override
8172// default T getType()
Original file line number Diff line number Diff line change @@ -120,18 +120,9 @@ default T getAt( final RealLocalizable position )
120120 return realRandomAccess ().setPositionAndGet ( position );
121121 }
122122
123- /**
124- * Get an instance of {@code T}.
125- * <p>
126- * It should not be assumed that the returned {@code T} instance is an
127- * independent copy. In particular, repeated calls to {@code getType()} may
128- * return the same instance.
129- * <p>
130- * The default implementation queries the value at the default coordinate of
131- * {@link RealRandomAccessible#realRandomAccess()}. Derived classes
132- * may choose different implementations for improved performance.
133- *
134- * @return an instance of {@code T}
123+ /*
124+ * NB: We cannot have a default implementation here because of
125+ * https://bugs.openjdk.org/browse/JDK-7120669
135126 */
136127// @Override
137128// default T getType()
Original file line number Diff line number Diff line change 6363 */
6464public interface RealRandomAccessibleRealInterval < T > extends RealRandomAccessible < T >, RealInterval
6565{
66- /**
67- * Get an instance of {@code T}.
68- * <p>
69- * It should not be assumed that the returned {@code T} instance is an
70- * independent copy. In particular, repeated calls to {@code getType()} may
71- * return the same instance.
72- * <p>
73- * The default implementation queries the value at the min coordinate of
74- * this interval. Derived classes may choose different implementations for
75- * improved performance.
76- *
77- * @return an instance of {@code T}
66+ /*
67+ * NB: We cannot have a default implementation here because of
68+ * https://bugs.openjdk.org/browse/JDK-7120669
7869 */
7970// @Override
8071// default T getType()
You can’t perform that action at this time.
0 commit comments