I am currently using setUserData() and getUserData() to get the dynamic health status of my agents for Portrayals:

               this.getGeometry().setUserData(this.getHealthStatus());  --- in the Constructor
               int hColor = (int) (((MasonGeometry)object).getUserData());  --- in the UI

However, I am now trying to use GeoMason's getObjectsWithinDistance(), which returns a bag of objects with points. This function requires the use of casting to get the object or any attribute of the object other than the Point Geometry. For example, I'd like to get either the object itself or the object's assigned ID.

Example of casting solution from getObjectsWithinDistance() in DSchelling:
 DPerson neighbor = (DPerson) ((MasonGeometry) o).getUserData();

I can't use getUserData() for both purposes. It seems to only set one agent attribute. Is there another way to do either of these things? Can setUserData() ever be used for more than one attribute.

Thanks in advance!