app/src/main/java/org/jgrapht/alg/util/UnionFind.java
public void addElement(T element)
    {
        parentMap.put(element, element);
        rankMap.put(element, 0);
    }
/**
     * Adds a new element to the data structure in its own set.
     *
     * @param element The element to add.
     */
Adds a new element to the data structure in its own set.
@param element The element to add.
Adds a new element to the data structure in its own set . @param element The element to add .
public void addElement(T element)
    {
        parentMap.put(element, element);
        rankMap.put(element, 0);
    }
public void addElement ( T element ) { parentMap . put ( element , element ) ; rankMap . put ( element , 0 ) ; }
Adds a new element to the data structure in its own set.
Adds a new element to the data structure in its own set .