modules/ballerina-core/src/main/java/org/ballerinalang/model/types/TypeLattice.java
public boolean addVertex(TypeVertex vertex, boolean overwriteExisting) {
        TypeVertex current = this.vertices.get(vertex.toString());
        if (current != null) {
            if (!overwriteExisting) {
                return false;
            }

            while (current.getNeighborCount() > 0) {
                removeEdge(current.getNeighbor(0));
            }
        }


        this.vertices.put(vertex.toString(), vertex);
        return true;
    }
/**
     * This method adds a TypeVertex to the graph. If a TypeVertex with the same label
     * as the parameter exists in the Graph, the existing TypeVertex is overwritten
     * only if overwriteExisting is true. If the existing TypeVertex is overwritten,
     * the Edges incident to it are all removed from the Graph.
     *
     * @param vertex
     * @param overwriteExisting
     * @return true iff vertex was added to the Graph
     */
This method adds a TypeVertex to the graph. If a TypeVertex with the same label
as the parameter exists in the Graph, the existing TypeVertex is overwritten
only if overwriteExisting is true. If the existing TypeVertex is overwritten,
the Edges incident to it are all removed from the Graph.

@param vertex
@param overwriteExisting
@return true iff vertex was added to the Graph
This method adds a TypeVertex to the graph . If a TypeVertex with the same label as the parameter exists in the Graph the existing TypeVertex is overwritten only if overwriteExisting is true . If the existing TypeVertex is overwritten the Edges incident to it are all removed from the Graph . @param vertex @param overwriteExisting @return true iff vertex was added to the Graph
public boolean addVertex(TypeVertex vertex, boolean overwriteExisting) {
        TypeVertex current = this.vertices.get(vertex.toString());
        if (current != null) {
            if (!overwriteExisting) {
                return false;
            }
            while (current.getNeighborCount() > 0) {
                removeEdge(current.getNeighbor(0));
            }
        }
        this.vertices.put(vertex.toString(), vertex);
        return true;
    }
public boolean addVertex ( TypeVertex vertex , boolean overwriteExisting ) { TypeVertex current = this . vertices . get ( vertex . toString ( ) ) ; if ( current != null ) { if ( ! overwriteExisting ) { return false ; } while ( current . getNeighborCount ( ) > 0 ) { removeEdge ( current . getNeighbor ( 0 ) ) ; } } this . vertices . put ( vertex . toString ( ) , vertex ) ; return true ; }
This method adds a TypeVertex to the graph.
This method adds a TypeVertex to the graph .