public final class

Pair

extends Object
java.lang.Object
   ↳ com.atlassian.upm.api.util.Pair<A, B>

Class Overview

A tuple of size 2.

Summary

Public Methods
boolean equals(Object o)
A first()
@Deprecated static <A, B> Function<Entry<A, B>, Pair<A, B>> fromMapEntry()
This method is deprecated. since 5.0, it will be removed in 6.0; use Pair::fromMapEntry instead
static <A, B> Pair<A, B> fromMapEntry(Entry<A, B> entry)
int hashCode()
static <A, B> Pair<A, B> pair(A first, B second)
Static factory method for creating pairs.
B second()
@Deprecated static <A, B> Function<Pair<A, B>, A> toFirst()
This method is deprecated. since 5.0, it will be removed in 6.0; use Pair::first instead
@Deprecated static <A, B> Function<Pair<A, B>, B> toSecond()
This method is deprecated. since 5.0, it will be removed in 6.0; use Pair::second instead
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean equals (Object o)

public A first ()

Returns
  • the first value

@Deprecated public static Function<Entry<A, B>, Pair<A, B>> fromMapEntry ()

This method is deprecated.
since 5.0, it will be removed in 6.0; use Pair::fromMapEntry instead

Function for converting key-value pairs from a Map.

public static Pair<A, B> fromMapEntry (Entry<A, B> entry)

public int hashCode ()

public static Pair<A, B> pair (A first, B second)

Static factory method for creating pairs.

Parameters
first the first value of the pair
second the second value of the pair
Returns
  • a new pair consisting of the first and second values

public B second ()

Returns
  • the second value

@Deprecated public static Function<Pair<A, B>, A> toFirst ()

This method is deprecated.
since 5.0, it will be removed in 6.0; use Pair::first instead

Function for converting a Pair to its first value.

@Deprecated public static Function<Pair<A, B>, B> toSecond ()

This method is deprecated.
since 5.0, it will be removed in 6.0; use Pair::second instead

Function for converting a Pair to its second value.

public String toString ()

Give us feedback

Was this documentation helpful?