Original Post
I have a Skeleton object manages a bunch of Bone objects. Now at a later point I have a bunch of BoneSprites objects, each of which are attached to a bone object. BoneSprites are in a different package and have lots of game-specific info so bones shouldn't know anything about them. Currently this means that each BoneSprite references it's attached Bone. But now I need a mapping of Bone objects to their relevant BoneSprite (the reverse relationship). I could use a hash map but I'm already holding a similar data structure so it would be unnessisary duplication of code and behaviour. So the next method would be a generic 'data' field in the Bone class to let the user attach arbitrary data along with it - in C that'd be a void*, in Java an Object. Obviously this isn't a new idea and I'm sure it's got a proper name, does anyone know what it's called?