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

package it.unimi.dsi.fastutil.bytes;

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

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