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

package it.unimi.dsi.fastutil.booleans;

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

public class BooleanBooleanMutablePair implements BooleanBooleanPair, Serializable
{
    private static final long serialVersionUID = 0L;
    protected boolean left;
    protected boolean right;
    
    public BooleanBooleanMutablePair(final boolean left, final boolean right) {
        this.left = left;
        this.right = right;
    }
    
    public static BooleanBooleanMutablePair of(final boolean left, final boolean right) {
        return new BooleanBooleanMutablePair(left, right);
    }
    
    @Override
    public boolean leftBoolean() {
        return this.left;
    }
    
    @Override
    public BooleanBooleanMutablePair left(final boolean l) {
        this.left = l;
        return this;
    }
    
    @Override
    public boolean rightBoolean() {
        return this.right;
    }
    
    @Override
    public BooleanBooleanMutablePair right(final boolean r) {
        this.right = r;
        return this;
    }
    
    @Override
    public boolean equals(final Object other) {
        if (other == null) {
            return false;
        }
        if (other instanceof BooleanBooleanPair) {
            return this.left == ((BooleanBooleanPair)other).leftBoolean() && this.right == ((BooleanBooleanPair)other).rightBoolean();
        }
        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 + (this.right ? 1231 : 1237);
    }
    
    @Override
    public String toString() {
        return "<" + this.leftBoolean() + "," + this.rightBoolean() + ">";
    }
}
