@Override
    public boolean equals(Object o)
    {
        if (o == this)
        {
            return true;
        }
        if (!(o instanceof Vertex<?>))
        {
            return false;
        }
        Vertex<?> v = (Vertex<?>)o;
        return value.equals(v.value) && adjacent.equals(v.adjacent);
    }