• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Iterate on an object

For example, I have a Photograph class; the constructor summary is:

Photograph(java.lang.String location, int width, int height, java.util.Date date, java.lang.String description, Person[] subjects, Event event)

Is is possible for me to loop on an object's attibutes?

For example, can I do something like

Loop on a Photograph, for each attibute, I assign it to a collection. Hence, for a Photograph object, I have 7 collection, each with differet type (string, int, event, date, etc)

Just curious.

Thanks
0
tiger0516
Asked:
tiger0516
1 Solution
 
objectsCommented:
Not without implementing it yourself.
ie. there is no builtin support for doing it
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now