// 
// Decompiled by Procyon v0.6.0
// 

package it.unimi.dsi.fastutil.bytes;

import java.util.Comparator;
import it.unimi.dsi.fastutil.Pair;

public interface ByteBytePair extends Pair<Byte, Byte>
{
    byte leftByte();
    
    @Deprecated
    default Byte left() {
        return this.leftByte();
    }
    
    default ByteBytePair left(final byte l) {
        throw new UnsupportedOperationException();
    }
    
    @Deprecated
    default ByteBytePair left(final Byte l) {
        return this.left((byte)l);
    }
    
    default byte firstByte() {
        return this.leftByte();
    }
    
    @Deprecated
    default Byte first() {
        return this.firstByte();
    }
    
    default ByteBytePair first(final byte l) {
        return this.left(l);
    }
    
    @Deprecated
    default ByteBytePair first(final Byte l) {
        return this.first((byte)l);
    }
    
    default byte keyByte() {
        return this.firstByte();
    }
    
    @Deprecated
    default Byte key() {
        return this.keyByte();
    }
    
    default ByteBytePair key(final byte l) {
        return this.left(l);
    }
    
    @Deprecated
    default ByteBytePair key(final Byte l) {
        return this.key((byte)l);
    }
    
    byte rightByte();
    
    @Deprecated
    default Byte right() {
        return this.rightByte();
    }
    
    default ByteBytePair right(final byte r) {
        throw new UnsupportedOperationException();
    }
    
    @Deprecated
    default ByteBytePair right(final Byte l) {
        return this.right((byte)l);
    }
    
    default byte secondByte() {
        return this.rightByte();
    }
    
    @Deprecated
    default Byte second() {
        return this.secondByte();
    }
    
    default ByteBytePair second(final byte r) {
        return this.right(r);
    }
    
    @Deprecated
    default ByteBytePair second(final Byte l) {
        return this.second((byte)l);
    }
    
    default byte valueByte() {
        return this.rightByte();
    }
    
    @Deprecated
    default Byte value() {
        return this.valueByte();
    }
    
    default ByteBytePair value(final byte r) {
        return this.right(r);
    }
    
    @Deprecated
    default ByteBytePair value(final Byte l) {
        return this.value((byte)l);
    }
    
    default ByteBytePair of(final byte left, final byte right) {
        return new ByteByteImmutablePair(left, right);
    }
    
    default Comparator<ByteBytePair> lexComparator() {
        return (x, y) -> {
            final int t = Byte.compare(x.leftByte(), y.leftByte());
            if (t != 0) {
                return t;
            }
            else {
                return Byte.compare(x.rightByte(), y.rightByte());
            }
        };
    }
}
