Skip to content

Commit fd3ea5a

Browse files
committed
Table: tweak style of for loops
1 parent bdd48bc commit fd3ea5a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/main/java/org/scijava/table/Table.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,14 @@ default void appendRow(final String header) {
224224

225225
/** Appends a block of rows (with no headers) to the table. */
226226
default void appendRows(final int count) {
227-
for (int c = 0; c < count; c++) {
227+
for (int c = 0; c < count; c++)
228228
appendRow();
229-
}
230229
}
231230

232231
/** Appends a block of rows with the given headers to the table. */
233232
default void appendRows(final String... headers) {
234-
for (final String header : headers) {
233+
for (final String header : headers)
235234
appendRow(header);
236-
}
237235
}
238236

239237
/** Inserts a row (with no header) at the given position in the table. */
@@ -266,9 +264,8 @@ default void insertRows(final int row, final int count) {
266264
// over and over again.
267265
for (int oldR = oldRowCount - 1; oldR >= row; oldR--) {
268266
final int newR = oldR + count;
269-
for (int c = 0; c < getColumnCount(); c++) {
267+
for (int c = 0; c < getColumnCount(); c++)
270268
set(c, newR, get(c, oldR));
271-
}
272269
}
273270

274271
// copy row headers after the inserted range into the new position
@@ -281,9 +278,8 @@ default void insertRows(final int row, final int count) {
281278

282279
// insert new blank row data
283280
for (int r = 0; r < count; r++) {
284-
for (int c = 0; c < getColumnCount(); c++) {
281+
for (int c = 0; c < getColumnCount(); c++)
285282
set(c, row + r, null);
286-
}
287283
}
288284

289285
// insert new blank row headers

0 commit comments

Comments
 (0)