Package org.eclipse.jgit.diff

## Class HashedSequencePair<S extends Sequence>

- java.lang.Object
- - org.eclipse.jgit.diff.HashedSequencePair<S>

Type Parameters:
  `S` - the base sequence type.

    public class HashedSequencePair<S extends Sequence>
    extends Object

Wraps two `Sequence` instances to cache their element hash codes.

This pair wraps two sequences that contain cached hash codes for the input sequences.

### Constructor Summary

Constructors
`HashedSequencePair​(SequenceComparator<? super S> cmp, S a, S b)` Construct a pair to provide fast hash codes.

### Method Summary

All Methods Instance Methods Concrete Methods
`HashedSequence<S>` `getA()`
`HashedSequence<S>` `getB()`
`HashedSequenceComparator<S>` `getComparator()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HashedSequencePair

    public HashedSequencePair​(SequenceComparator<? super S> cmp,
                              S a,
                              S b)

Construct a pair to provide fast hash codes.

Parameters:
  `cmp` - the base comparator for the sequence elements.
  `a` - the A sequence.
  `b` - the B sequence.

### Method Detail

#### getComparator

    public HashedSequenceComparator<S> getComparator()

Returns:
  obtain a comparator that uses the cached hash codes.

#### getA

    public HashedSequence<S> getA()

Returns:
  wrapper around A that includes cached hash codes.

#### getB

    public HashedSequence<S> getB()

Returns:
  wrapper around B that includes cached hash codes.