Vector accepts classes of Object type, so you can add any object into that.
But when you retrieve object from that Vector, object will be in the form of
Object, so you need to cast it into your custom class. Then you can use that.
for example: ((myclass)id.elementAt(i)).myMethod();