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

package it.unimi.dsi.fastutil.objects;

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

public class ReferenceReferenceMutablePair<K, V> implements ReferenceReferencePair<K, V>, Serializable
{
    private static final long serialVersionUID = 0L;
    protected K left;
    protected V right;
    
    public ReferenceReferenceMutablePair(final K left, final V right) {
        this.left = left;
        this.right = right;
    }
    
    public static <K, V> ReferenceReferenceMutablePair<K, V> of(final K left, final V right) {
        return new ReferenceReferenceMutablePair<K, V>(left, right);
    }
    
    @Override
    public K left() {
        return this.left;
    }
    
    @Override
    public ReferenceReferenceMutablePair<K, V> left(final K l) {
        this.left = l;
        return this;
    }
    
    @Override
    public V right() {
        return this.right;
    }
    
    @Override
    public ReferenceReferenceMutablePair<K, V> right(final V r) {
        this.right = r;
        return this;
    }
    
    @Override
    public boolean equals(final Object other) {
        return other != null && other instanceof Pair && this.left == ((Pair)other).left() && this.right == ((Pair)other).right();
    }
    
    @Override
    public int hashCode() {
        return System.identityHashCode(this.left) * 19 + ((this.right == null) ? 0 : System.identityHashCode(this.right));
    }
    
    @Override
    public String toString() {
        return "<" + this.left() + "," + this.right() + ">";
    }
}
