Class Pair<L,R>

java.lang.Object
com.bobocode.bring.core.utils.Pair<L,R>
Type Parameters:
L - The type of the left value
R - The type of the right value

public class Pair<L,R> extends Object
A simple generic class representing a pair of two values: left and right.
Since:
1.0
Author:
Blyzhnytsia Team
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) L
    The left value of the pair.
    (package private) R
    The right value of the pair.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <L, R> Pair<L,R>
    of(L left, R right)
    Creates a new Pair object with the specified left and right values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • left

      L left
      The left value of the pair.
  • Constructor Details

    • Pair

      public Pair()
  • Method Details

    • of

      public static <L, R> Pair<L,R> of(L left, R right)
      Creates a new Pair object with the specified left and right values.
      Type Parameters:
      L - The type of the left value
      R - The type of the right value
      Parameters:
      left - The left value
      right - The right value
      Returns:
      A new Pair object with the given left and right values