public Object shiftRightUnsigned(final Object i, final Object bits) { if (i instanceof Integer && bits instanceof Integer) { return _shiftRightUnsigned((Integer)i, (Integer)bits); } else if (i instanceof Long && bits instanceof Integer) { return _shiftRightUnsigned((Long)i, (Integer)bits); } else if (i != null && bits != null) { return _shiftRightUnsigned(i, bits); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(i, bits).toString()); } }