Skip to content

Commit

Permalink
add method Tuple#toArray
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Jul 10, 2023
1 parent d540c28 commit 9d984c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/esaulpaugh/headlong/abi/Tuple.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ public Tuple deepCopy() {
return new Tuple(deepCopy);
}

public Object[] toArray() {
return Arrays.copyOf(elements, elements.length);
}

private static Object deepCopyElement(Object e) {
if(e.getClass().isArray()) {
if (e instanceof Object[]) {
Expand Down

0 comments on commit 9d984c3

Please sign in to comment.