title: How to check the java data type of an element in a custom collection?
body: <pre><code>Object ele=a.get(i);
  if(ele instanceof java.lang.Integer){//cast to integer:
      print("found Int");
  }else{ //cast to string:
      print("found: "+ele.getClass());
  }
  //prints: found: class com.cycling74.max.Atom$IntAtom
  </code></pre>
  
  <p>This is part of a larger chunk of code but this is the relevant part. I need to know how to check the type of an element in the Atom class by <a href="http://www.le-son666.com/software/pdj/api/com/cycling74/max/Atom.html" rel="nofollow">cycling74</a>.</p>
  
  <pre><code>if(ele instanceof com.cycling74.max.Atom$IntAtom)
  //ERROR: com.cycling74.max.Atom.IntAtom has private access in com.cycling74.max.Atom
  </code></pre>
  
  <p>Any ideas??
  Thanks a lot - this is really doing my head in!!</p>