use java compare methods for basic types