Package org.owasp.dependencycheck.utils
Class Pair<L,R>
- java.lang.Object
-
- org.owasp.dependencycheck.utils.Pair<L,R>
-
- Type Parameters:
L
- the type for the left element in the pairR
- the type for the right element in the pair
@ThreadSafe public class Pair<L,R> extends java.lang.Object
A generic pair of elements.- Author:
- Jeremy Long
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Determines the equality of this and the provided object.L
getLeft()
Get the value of left.R
getRight()
Get the value of right.int
hashCode()
Generates the hash code using the hash codes from the contained objects.void
setLeft(L left)
Set the value of left.void
setRight(R right)
Set the value of right.
-
-
-
Method Detail
-
getLeft
public L getLeft()
Get the value of left.- Returns:
- the value of left
-
setLeft
public void setLeft(L left)
Set the value of left.- Parameters:
left
- new value of left
-
getRight
public R getRight()
Get the value of right.- Returns:
- the value of right
-
setRight
public void setRight(R right)
Set the value of right.- Parameters:
right
- new value of right
-
hashCode
public int hashCode()
Generates the hash code using the hash codes from the contained objects.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hash code of the Pair
-
equals
public boolean equals(java.lang.Object obj)
Determines the equality of this and the provided object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- theObject
to check for equality to this- Returns:
- true if this and the provided
Object
are equal; otherwise false
-
-