We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94fe2be commit c6e396dCopy full SHA for c6e396d
src/main/java/com/widen/tabitha/Row.java
@@ -11,6 +11,20 @@
11
public class Row implements Iterable<Row.Cell> {
12
private final Row.Cell[] cells;
13
14
+ /**
15
+ * Create a copy of a row.
16
+ * <p>
17
+ * This is not a deep copy, as a deep copy is not necessary. Since cells are immutable, columns and values can be
18
+ * reused without copying. Setting a new value will lazily create a new cell instance.
19
+ *
20
+ * @param row The row to copy.
21
+ * @return A copy of the row.
22
+ */
23
+ public static Row copyOf(Row row)
24
+ {
25
+ return new Row(Arrays.copyOf(row.cells, row.cells.length));
26
+ }
27
+
28
/**
29
* Create a new row that merges the columns and values of all the given rows.
30
*
0 commit comments