title: Check if an object is an instance of any one of a list of classes (Android)
body: <p>I've been looking at this for a while, and whilst it's not critical, I was wondering if there is a neat way (1 liner perhaps) that I can use to check if an object is an instance of any of several classes for example, I could do:</p>
  
  <pre><code>if(anObject instanceof Pupil){ ... } 
  else if(anObject instanceof Teacher) { ... }
  </code></pre>
  
  <p>And so on and so forth. Is there a better way to do this, or is this as good as I'm going to get?</p>