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

package it.unimi.dsi.fastutil.chars;

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

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