modules/ballerina-core/src/main/java/org/ballerinalang/model/types/TypeLattice.java
/**
     * Accepts two vertices and a weight, and adds the edge
     * ({one, two}, weight) iff no TypeEdge relating one and two
     * exists in the Graph.
     *
     * @param one           The first TypeVertex of the TypeEdge
     * @param two           The second TypeVertex of the TypeEdge
     * @param typeMapper The weight of the TypeEdge
     * @return true iff no TypeEdge already exists in the Graph
     */
Accepts two vertices and a weight, and adds the edge
({one, two}, weight) iff no TypeEdge relating one and two
exists in the Graph.

@param one           The first TypeVertex of the TypeEdge
@param two           The second TypeVertex of the TypeEdge
@param typeMapper The weight of the TypeEdge
@return true iff no TypeEdge already exists in the Graph
Accepts two vertices and a weight and adds the edge ( { one two } weight ) iff no TypeEdge relating one and two exists in the Graph . @param one The first TypeVertex of the TypeEdge @param two The second TypeVertex of the TypeEdge @param typeMapper The weight of the TypeEdge @return true iff no TypeEdge already exists in the Graph
public boolean addEdge(TypeVertex one, TypeVertex two, TypeMapper typeMapper, String packageName) {
        TypeEdge e = new TypeEdge(one, two, typeMapper, packageName);
        if (this.edges.containsKey(e.hashCode())) {
            return false;
        } else if (one.containsNeighbor(e) || two.containsNeighbor(e)) {
            return false;
        }
        this.edges.put(e.hashCode(), e);
        one.addNeighbor(e);
        two.addNeighbor(e);
        return true;
    }
public boolean addEdge ( TypeVertex one , TypeVertex two , TypeMapper typeMapper , String packageName ) { TypeEdge e = new TypeEdge ( one , two , typeMapper , packageName ) ; if ( this . edges . containsKey ( e . hashCode ( ) ) ) { return false ; } else if ( one . containsNeighbor ( e ) || two . containsNeighbor ( e ) ) { return false ; } this . edges . put ( e . hashCode ( ) , e ) ; one . addNeighbor ( e ) ; two . addNeighbor ( e ) ; return true ; }
Accepts two vertices and a weight, and adds the edge
 ({one, two}, weight) iff no TypeEdge relating one and two
 exists in the Graph.
Accepts two vertices and a weight and adds the edge ( { one two } weight ) iff no TypeEdge relating one and two exists in the Graph .
//ensures the TypeEdge is not in the Graph