- To: Kevin Manross <kevin.manross@xxxxxxxx>
- Subject: Re: Get Set Type
- From: Bill Hibbard <billh@xxxxxxxxxxxxx>
- Date: Sat, 24 Jan 2004 16:30:48 -0600 (CST)
Hi Kevin, > If I print a Set (Irregular1DSet, Linear3DSet, Gridded2DSet, etc.) to > standard output, I get output that resmbles the following: > > > visad.Irregular1DSet: Dimension = ........ > > How can I ask a Set which kind of set it is? Typically, I already know > the set and just cast it, but I'm trying to make my code a bit more > "generic" For any Java object obj, you can do: String class_name = obj.getClass().getName(); Good luck, Bill
- References:
- Get Set Type
- From: Kevin Manross
- Get Set Type