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

package it.unimi.dsi.fastutil.booleans;

import it.unimi.dsi.fastutil.HashCommon;
import java.util.Objects;
import it.unimi.dsi.fastutil.Pair;
import java.io.Serializable;

public class BooleanLongMutablePair implements BooleanLongPair, Serializable
{
    private static final long serialVersionUID = 0L;
    protected boolean left;
    protected long right;
    
    public BooleanLongMutablePair(final boolean left, final long right) {
        this.left = left;
        this.right = right;
    }
    
    public static BooleanLongMutablePair of(final boolean left, final long right) {
        return new BooleanLongMutablePair(left, right);
    }
    
    @Override
    public boolean leftBoolean() {
        return this.left;
    }
    
    @Override
    public BooleanLongMutablePair left(final boolean l) {
        this.left = l;
        return this;
    }
    
    @Override
    public long rightLong() {
        return this.right;
    }
    
    @Override
    public BooleanLongMutablePair right(final long r) {
        this.right = r;
        return this;
    }
    
    @Override
    public boolean equals(final Object other) {
        if (other == null) {
            return false;
        }
        if (other instanceof BooleanLongPair) {
            return this.left == ((BooleanLongPair)other).leftBoolean() && this.right == ((BooleanLongPair)other).rightLong();
        }
        return other instanceof Pair && Objects.equals(this.left, ((Pair)other).left()) && Objects.equals(this.right, ((Pair)other).right());
    }
    
    @Override
    public int hashCode() {
        return (this.left ? 1231 : 1237) * 19 + HashCommon.long2int(this.right);
    }
    
    @Override
    public String toString() {
        return "<" + this.leftBoolean() + "," + this.rightLong() + ">";
    }
}
