I'd like to use the integer-id-value of my vertex-class as an index, in my Map-structure, without using a parallel data structure.
class Vertex {
private int v;
private int label;
//...
}
I store vertex objects, in a Map<Vertex,ArrayList<Edge>> adjMap
.
Is it possible use the v-property of my Vertex class, as an index-key in my Map?