View Javadoc

1   /**
2    * Project MI+
3    *
4    * Copyright (c) 2013, Syed Muhammad Humayun - smhumayun@gmail.com
5    *
6    * This project includes software developed by Syed Muhammad Humayun - smhumayun@gmail.com
7    * http://www.smhumayun.com
8    *
9    * Licensed under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License. You may obtain a copy of the License at:
12   *
13   * http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on
17   * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied. See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21   */
22  package com.smhumayun.mi_plus.util;
23  
24  /**
25   * Class to represent pair data structure
26   * @param <L> left side of the pair
27   * @param <R> right side of the pair
28   *
29   * @author smhumayun
30   * @since 1.0
31   */
32  public class Pair<L,R> {
33  
34      private final L left;
35      private final R right;
36  
37      public Pair(L left, R right) {
38          this.left = left;
39          this.right = right;
40      }
41  
42      public L getLeft() { return left; }
43      public R getRight() { return right; }
44  
45  }