Skip to content

Commit

Permalink
Update Pair.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonUden committed Apr 27, 2024
1 parent 45d0947 commit a378aa2
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package net.zeeraa.novacore.commons.utils;

import java.util.ArrayList;
import java.util.List;

public class Pair<T> {
private T object1;
private T object2;
Expand All @@ -25,6 +28,13 @@ public void setObject2(T object2) {
this.object2 = object2;
}

public List<T> toList() {
List<T> result = new ArrayList<T>();
result.add(object1);
result.add(object2);
return result;
}

@SuppressWarnings("rawtypes")
@Override
public boolean equals(Object obj) {
Expand Down

0 comments on commit a378aa2

Please sign in to comment.