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

package it.unimi.dsi.fastutil.booleans;

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

public interface BooleanObjectPair<V> extends Pair<Boolean, V>
{
    boolean leftBoolean();
    
    @Deprecated
    default Boolean left() {
        return this.leftBoolean();
    }
    
    default BooleanObjectPair<V> left(final boolean l) {
        throw new UnsupportedOperationException();
    }
    
    @Deprecated
    default BooleanObjectPair<V> left(final Boolean l) {
        return this.left((boolean)l);
    }
    
    default boolean firstBoolean() {
        return this.leftBoolean();
    }
    
    @Deprecated
    default Boolean first() {
        return this.firstBoolean();
    }
    
    default BooleanObjectPair<V> first(final boolean l) {
        return this.left(l);
    }
    
    @Deprecated
    default BooleanObjectPair<V> first(final Boolean l) {
        return this.first((boolean)l);
    }
    
    default boolean keyBoolean() {
        return this.firstBoolean();
    }
    
    @Deprecated
    default Boolean key() {
        return this.keyBoolean();
    }
    
    default BooleanObjectPair<V> key(final boolean l) {
        return this.left(l);
    }
    
    @Deprecated
    default BooleanObjectPair<V> key(final Boolean l) {
        return this.key((boolean)l);
    }
    
    default <V> BooleanObjectPair<V> of(final boolean left, final V right) {
        return new BooleanObjectImmutablePair<V>(left, right);
    }
    
    default <V> Comparator<BooleanObjectPair<V>> lexComparator() {
        return (x, y) -> {
            final int t = Boolean.compare(x.leftBoolean(), y.leftBoolean());
            if (t != 0) {
                return t;
            }
            else {
                return ((Comparable)x.right()).compareTo(y.right());
            }
        };
    }
}
