package org.hiatusuk.selectorLint.tree;

import com.google.common.base.MoreObjects;

public class NodeRelation {
    private final boolean directParent;
    private final Node target;

    public NodeRelation(final Node node, final boolean direct) {
        this.target = node;
        this.directParent = direct;
    }

    public Node getTarget() {
        return target;
    }

    public boolean isDirectParent() {
        return directParent;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper("Relation").add("target", target).add("direct?", directParent).omitNullValues().toString();
    }
}

@@ -78,16 +78,43 @@
 jects;%0A%0A
+import java.util.Objects;%0A%0A
 public c
@@ -471,24 +471,539 @@
 ent;%0A    %7D%0A%0A
+    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(directParent, target);%0A    %7D%0A%0A    @Override%0A    public boolean equals( Object obj) %7B%0A        if (this == obj) %7B%0A            return true;%0A        %7D%0A        if (obj == null) %7B%0A            return false;%0A        %7D%0A        if (!(obj instanceof NodeRelation)) %7B%0A            return false;%0A        %7D%0A        final NodeRelation other = (NodeRelation) obj;%0A        return directParent == other.directParent && Objects.equals(target, other.target);%0A    %7D%0A%0A
     @Overrid

Add equals / hashCode