MathUtil { public static int getNonNegative(int originValue){ return 0x7fffffff & originValue; }  static int parseInt(String intStr, int defaultValue); static long parseLong(String longStr, long defaultValue); static int getNonNegative(int originValue); static int getNonNegativeRange24bit(int originValue);  }
@Test public void getNonNegative() { assertTrue(MathUtil.getNonNegative(Integer.MIN_VALUE)==0); assertTrue(MathUtil.getNonNegative(-1)>0); assertTrue(MathUtil.getNonNegative(0)==0); assertTrue(MathUtil.getNonNegative(1)==1); assertTrue(MathUtil.getNonNegative(Integer.MAX_VALUE)==Integer.MAX_VALUE); }