@Override
    public boolean equals(Object o)
    {
        if (o.getClass() != Tree.class) return false;
        Tree t = (Tree)o;
        LinkedList list = toLinkedList();
        while (list.hasNext())
            if (!t.contains(list.getNext()))    return false;
        return size == t.size();
    }