Skip to content

Commit 3e42aea

Browse files
committed
Added pair structure
1 parent 869b238 commit 3e42aea

File tree

1 file changed

+32
-0
lines changed
  • src/main/java/com/datdeveloper/datmoddingapi/collections

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.datdeveloper.datmoddingapi.collections;
2+
3+
/**
4+
* A simple container for 2 values
5+
* @param <lh> the type of the left hand
6+
* @param <rh> the type of the right hand
7+
*/
8+
public class Pair<lh, rh> {
9+
private lh leftHand;
10+
private rh rightHand;
11+
12+
public Pair(final lh leftHand, final rh rightHand) {
13+
this.leftHand = leftHand;
14+
this.rightHand = rightHand;
15+
}
16+
17+
public lh getLeftHand() {
18+
return leftHand;
19+
}
20+
21+
public rh getRightHand() {
22+
return rightHand;
23+
}
24+
25+
public void setLeftHand(final lh leftHand) {
26+
this.leftHand = leftHand;
27+
}
28+
29+
public void setRightHand(final rh rightHand) {
30+
this.rightHand = rightHand;
31+
}
32+
}

0 commit comments

Comments
 (0)