title: Java interface to compare various data types
body: <p>I need to have an interface that will allow this to work for all data types if implemented with generics. Something to this effect. </p>
  
  <pre><code>  if (myIter.myDataType &lt; SearchDataType){
        return myIter;
    }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  if (myIter.compareTo(SearchDataType)){
        return myIter;
    }
  </code></pre>
  
  <p>needs to work with integers, char, strings and even Boolean if possible.
  I'm new to java so I'm not aware of something that does this.</p>