Skip to content

Commit 44fc27a

Browse files
author
Open Lowcode SAS
committed
Addition of utility Pair class
1 parent 55086c8 commit 44fc27a

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/********************************************************************************
2+
* Copyright (c) 2020 [Open Lowcode SAS](https://openlowcode.com/)
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0 .
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
********************************************************************************/
10+
11+
package org.openlowcode.tools.misc;
12+
13+
/**
14+
* A utility class to manage pair of objects with a given type
15+
*
16+
* @author <a href="https://openlowcode.com/" rel="nofollow">Open Lowcode
17+
* SAS</a>
18+
* @since 1.1
19+
* @param <E> first object type
20+
* @param <F> second object type
21+
*/
22+
public class Pair<E extends Object, F extends Object> {
23+
private E firstobject;
24+
private F secondobject;
25+
26+
/**
27+
* create a pair with the two objects as specified
28+
*
29+
* @param firstobject first object
30+
* @param secondobject second object
31+
*/
32+
public Pair(E firstobject, F secondobject) {
33+
this.firstobject = firstobject;
34+
this.secondobject = secondobject;
35+
}
36+
37+
/**
38+
* @return the first object
39+
*/
40+
public E getFirstobject() {
41+
return firstobject;
42+
}
43+
44+
/**
45+
* @return the second object
46+
*/
47+
public F getSecondobject() {
48+
return secondobject;
49+
}
50+
51+
}

0 commit comments

Comments
 (0)