public void addSet(final SortedSet<T> set) {
        SortedMap<T, UBNode<T>> nodes = rootNodes;
        UBNode<T> node = null;
        for (T element : set) {
            node = nodes.get(element);
            if (node == null) {
                node = new UBNode<>(element);
                nodes.put(element, node);
            }
            nodes = node.children();
        }
        if (node != null) {
            node.setEndSet(set);
        }
    }
public void addSet ( final SortedSet < T > set ) { SortedMap < T , UBNode < T > > nodes = rootNodes ; UBNode < T > node = null ; for ( T element : set ) { node = nodes . get ( element ) ; if ( node == null ) { node = new UBNode < > ( element ) ; nodes . put ( element , node ) ; } nodes = node . children ( ) ; } if ( node != null ) { node . setEndSet ( set ) ; } }
Adds a set of comparable objects to this UBTree.
@param set the set of comparable objects