title: Java: get greatest common divisor
body: <p>I have seen that such a function exists for <code>BigInteger</code>, i.e. <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html#gcd%28java.math.BigInteger%29" rel="noreferrer"><code>BigInteger#gcd</code></a>. Are there other functions in Java which also work for other types (<code>int</code>, <code>long</code> or <code>Integer</code>)? It seems this would make sense as <code>java.lang.Math.gcd</code> (with all kinds of overloads) but it is not there. Is it somewhere else?</p>
  
  <hr>
  
  <p>(Don't confuse this question with "how do I implement this myself", please!)</p>