modules/ballerina-core/src/main/java/org/ballerinalang/model/types/TypeLattice.java
public boolean addEdge(TypeVertex one, TypeVertex two, Function typeMapper) {

        //ensures the TypeEdge is not in the Graph
        TypeEdge e = new TypeEdge(one, two, typeMapper);
        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.
     *
     * @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, Function typeMapper) {
        TypeEdge e = new TypeEdge(one, two, typeMapper);
        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 , Function typeMapper ) { TypeEdge e = new TypeEdge ( one , two , typeMapper ) ; 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