Added trait implementation for integer types

Used the format used for cmp traits.