Forums > Java

get Atom generic type

September 27, 2013 | 12:55 am

Hi, i am looking for a way to get the subtype of an Atom in java.

can i do something like below (in pseudo code) :
post("is String : " + myatom.GetClass().equals(Atom.class)
post("is String : " + (myatom instanceof Atom));


September 27, 2013 | 6:31 pm

Check out the isInt(), isFloat(), and isString() methods of Atom.

For example:
post("is String : " + myatom.isString());


Viewing 2 posts - 1 through 2 (of 2 total)