package com.nitorcreations.domain;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

public class Edge {

    public final DomainObject source;
    public final DomainObject target;
    public final EdgeType type;
    public final Direction direction;

    public Edge(DomainObject source, DomainObject target, EdgeType type, Direction direction) {
        this.source = source;
        this.target = target;
        this.type = type;
        this.direction = direction;
    }

    public Edge(DomainObject source, DomainObject target, EdgeType type) {
        this(source, target, type, null);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

    @Override
    public boolean equals(Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }
}

@@ -751,16 +751,22 @@
  public 
+final 
 int hash
@@ -863,16 +863,22 @@
  public 
+final 
 boolean 

fix edge equals test