@Test public void testRound() { assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_UP ) ); assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 1.0, Const.round( 1.0, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 2.0, Const.round( 1.2, 0, BigDecimal.ROUND_UP ) ); assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 2.0, Const.round( 1.2, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 1.0, Const.round( 1.2, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_UP ) ); assertEquals( 1.0, Const.round( 1.5, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 1.0, Const.round( 1.5, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 1.0, Const.round( 1.5, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 2.0, Const.round( 1.5, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_UP ) ); assertEquals( 1.0, Const.round( 1.7, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 1.0, Const.round( 1.7, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 2.0, Const.round( 1.7, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_UP ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 2.0, Const.round( 2.0, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 3.0, Const.round( 2.2, 0, BigDecimal.ROUND_UP ) ); assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 3.0, Const.round( 2.2, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 2.0, Const.round( 2.2, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 3.0, Const.round( 2.5, 0, BigDecimal.ROUND_UP ) ); assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 3.0, Const.round( 2.5, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 3.0, Const.round( 2.5, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 3.0, Const.round( 2.5, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_UP ) ); assertEquals( 2.0, Const.round( 2.7, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( 2.0, Const.round( 2.7, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 3.0, Const.round( 2.7, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_UP ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -1.0, Const.round( -1.0, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -2.0, Const.round( -1.2, 0, BigDecimal.ROUND_UP ) ); assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -2.0, Const.round( -1.2, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -1.0, Const.round( -1.2, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_UP ) ); assertEquals( -1.0, Const.round( -1.5, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -1.0, Const.round( -1.5, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -1.0, Const.round( -1.5, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -1.0, Const.round( -1.5, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_UP ) ); assertEquals( -1.0, Const.round( -1.7, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -1.0, Const.round( -1.7, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -2.0, Const.round( -1.7, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_UP ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -2.0, Const.round( -2.0, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -3.0, Const.round( -2.2, 0, BigDecimal.ROUND_UP ) ); assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -3.0, Const.round( -2.2, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -2.0, Const.round( -2.2, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -3.0, Const.round( -2.5, 0, BigDecimal.ROUND_UP ) ); assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -3.0, Const.round( -2.5, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -3.0, Const.round( -2.5, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -2.0, Const.round( -2.5, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_UP ) ); assertEquals( -2.0, Const.round( -2.7, 0, BigDecimal.ROUND_DOWN ) ); assertEquals( -2.0, Const.round( -2.7, 0, BigDecimal.ROUND_CEILING ) ); assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_FLOOR ) ); assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -3.0, Const.round( -2.7, 0, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.010, Const.round( 0.010, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.020, Const.round( 0.012, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.020, Const.round( 0.012, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.010, Const.round( 0.012, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.010, Const.round( 0.015, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.010, Const.round( 0.015, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.010, Const.round( 0.015, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.020, Const.round( 0.015, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.010, Const.round( 0.017, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.010, Const.round( 0.017, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.020, Const.round( 0.017, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.020, Const.round( 0.020, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.030, Const.round( 0.022, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.030, Const.round( 0.022, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.020, Const.round( 0.022, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.030, Const.round( 0.025, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.030, Const.round( 0.025, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.030, Const.round( 0.025, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.030, Const.round( 0.025, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_UP ) ); assertEquals( 0.020, Const.round( 0.027, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( 0.020, Const.round( 0.027, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 0.030, Const.round( 0.027, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.010, Const.round( -0.010, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.020, Const.round( -0.012, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.020, Const.round( -0.012, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.010, Const.round( -0.012, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.010, Const.round( -0.015, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.010, Const.round( -0.015, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.010, Const.round( -0.015, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.010, Const.round( -0.015, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.010, Const.round( -0.017, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.010, Const.round( -0.017, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.020, Const.round( -0.017, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.020, Const.round( -0.020, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.030, Const.round( -0.022, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.030, Const.round( -0.022, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.020, Const.round( -0.022, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.030, Const.round( -0.025, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.030, Const.round( -0.025, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.030, Const.round( -0.025, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.020, Const.round( -0.025, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_UP ) ); assertEquals( -0.020, Const.round( -0.027, 2, BigDecimal.ROUND_DOWN ) ); assertEquals( -0.020, Const.round( -0.027, 2, BigDecimal.ROUND_CEILING ) ); assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -0.030, Const.round( -0.027, 2, Const.ROUND_HALF_CEILING ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 100.0, Const.round( 100.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 200.0, Const.round( 120.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 200.0, Const.round( 120.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 100.0, Const.round( 120.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 100.0, Const.round( 150.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 100.0, Const.round( 150.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 100.0, Const.round( 150.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 200.0, Const.round( 150.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 100.0, Const.round( 170.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 100.0, Const.round( 170.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 200.0, Const.round( 170.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 200.0, Const.round( 200.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 300.0, Const.round( 220.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 300.0, Const.round( 220.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 200.0, Const.round( 220.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 300.0, Const.round( 250.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 300.0, Const.round( 250.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 300.0, Const.round( 250.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 300.0, Const.round( 250.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( 200.0, Const.round( 270.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( 200.0, Const.round( 270.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( 300.0, Const.round( 270.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -100.0, Const.round( -100.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -200.0, Const.round( -120.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -200.0, Const.round( -120.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -100.0, Const.round( -120.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -100.0, Const.round( -150.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -100.0, Const.round( -150.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -100.0, Const.round( -150.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -100.0, Const.round( -150.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -100.0, Const.round( -170.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -100.0, Const.round( -170.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -200.0, Const.round( -170.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -200.0, Const.round( -200.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -300.0, Const.round( -220.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -300.0, Const.round( -220.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -200.0, Const.round( -220.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -300.0, Const.round( -250.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -300.0, Const.round( -250.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -300.0, Const.round( -250.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -200.0, Const.round( -250.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_UP ) ); assertEquals( -200.0, Const.round( -270.0, -2, BigDecimal.ROUND_DOWN ) ); assertEquals( -200.0, Const.round( -270.0, -2, BigDecimal.ROUND_CEILING ) ); assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_FLOOR ) ); assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_HALF_UP ) ); assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_HALF_DOWN ) ); assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_HALF_EVEN ) ); assertEquals( -300.0, Const.round( -270.0, -2, Const.ROUND_HALF_CEILING ) ); assertEquals( Double.NaN, Const.round( Double.NaN, 0, BigDecimal.ROUND_UP ) ); assertEquals( Double.NEGATIVE_INFINITY, Const.round( Double.NEGATIVE_INFINITY, 0, BigDecimal.ROUND_UP ) ); assertEquals( Double.POSITIVE_INFINITY, Const.round( Double.POSITIVE_INFINITY, 0, BigDecimal.ROUND_UP ) ); }
public static double round( double f, int places ) { return round( f, places, java.math.BigDecimal.ROUND_HALF_EVEN ); }
Const { public static double round( double f, int places ) { return round( f, places, java.math.BigDecimal.ROUND_HALF_EVEN ); } }
Const { public static double round( double f, int places ) { return round( f, places, java.math.BigDecimal.ROUND_HALF_EVEN ); }  }
Const { public static double round( double f, int places ) { return round( f, places, java.math.BigDecimal.ROUND_HALF_EVEN ); }  static double round( double f, int places ); static double round( double f, int places, int roundingMode ); static BigDecimal round( BigDecimal f, int places, int roundingMode ); static long round( long f, int places, int roundingMode ); static int toInt( String str, int def ); static long toLong( String str, long def ); static double toDouble( String str, double def ); static Date toDate( String str, Date def ); static boolean isSpace( char c ); static String ltrim( String source ); static String rtrim( String source ); static String trim( String str ); static String rightPad( String ret, int limit ); static String rightPad( StringBuffer ret, int limit ); static String rightPad( StringBuilder ret, int limit ); static String replace( String string, String repl, String with ); static void repl( StringBuffer str, String code, String repl ); static void repl( StringBuilder str, String code, String repl ); static int nrSpacesBefore( String field ); static int nrSpacesAfter( String field ); static boolean onlySpaces( String str ); static String getOS(); static String getQuoteCharByOS(); static String optionallyQuoteStringByOS( String string ); static boolean isWindows(); static boolean isLinux(); static boolean isOSX(); static boolean isKDE(); static String getHostname(); static String getHostnameReal(); static String getIPAddress(); static String getIPAddress( String networkInterfaceName ); static String getMACAddress(); static String getUserHomeDirectory(); static String getKettleDirectory(); static String getUserBaseDir(); static String getDIHomeDirectory(); static String getSharedObjectsFile(); static String getKettleLocalRepositoriesFile(); static String getKettleUserRepositoriesFile(); static String getKettleLocalCartePasswordFile(); static String getKettleCartePasswordFile(); static String getBaseDocUrl(); static String getDocUrl( final String uri ); static String getEnvironmentVariable( String variable, String deflt ); @Deprecated static String replEnv( String string ); @Deprecated static String[] replEnv( String[] string ); static String NVL( String source, String def ); static String nullToEmpty( String source ); static int indexOfString( String lookup, String[] array ); static int[] indexsOfStrings( String[] lookup, String[] array ); static int[] indexsOfFoundStrings( String[] lookup, String[] array ); static int indexOfString( String lookup, List<String> list ); static String[] sortStrings( String[] input ); static String[] splitString( String string, String separator ); static String[] splitString( String string, char separator ); static String[] splitString( String string, char separator, boolean escape ); static String[] splitPath( String path, String separator ); static String[] splitString( String stringToSplit, String delimiter, String enclosure ); static String[] splitString( String stringToSplit, String delimiter, String enclosure, boolean removeEnclosure ); static String[] getDistinctStrings( String[] strings ); static String getStackTracker( Throwable e ); static String getClassicStackTrace( Throwable e ); static String getCustomStackTrace( Throwable aThrowable ); @Deprecated static boolean isEmpty( String val ); @Deprecated static boolean isEmpty( StringBuffer val ); @Deprecated static boolean isEmpty( String[] vals ); @Deprecated static boolean isEmpty( CharSequence val ); @Deprecated static boolean isEmpty( CharSequence[] vals ); @Deprecated static boolean isEmpty( Object[] array ); @Deprecated static boolean isEmpty( List<?> list ); static ClassLoader createNewClassLoader(); static byte[] createByteArray( int size ); static String initCap( String string ); static String createFilename( String name ); static String createFilename( String directory, String name, String extension ); static String createName( String filename ); static String filenameOnly( String sFullPath ); static String[] getDateFormats(); static String[] getNumberFormats(); static String[] getConversionFormats(); static String[] getTransformationAndJobFilterNames(); static String[] getTransformationFilterNames(); static String[] getJobFilterNames(); static long nanoTime(); static String trimToType( String string, int trimType ); static String safeAppendDirectory( String dir, String file ); static String[] getEmptyPaddedStrings(); static int getPercentageFreeMemory(); static String removeDigits( String input ); static String getDigitsOnly( String input ); static Date removeTimeFromDate( Date input ); static String escapeXML( String content ); static String escapeHtml( String content ); static String unEscapeHtml( String content ); static String unEscapeXml( String content ); static String escapeSQL( String content ); static String removeCRLF( String in ); static String removeChar( String in, char badChar ); static String removeCR( String in ); static String removeLF( String in ); static String removeTAB( String in ); static Date addTimeToDate( Date input, String time, String DateFormat ); static int decodeTime( String s, String DateFormat ); static int getOccurenceString( String string, String searchFor ); static String[] GetAvailableFontNames(); static String getKettlePropertiesFileHeader(); static String protectXMLCDATA( String content ); static int getOcuranceString( String string, String searchFor ); static String escapeXml( String content ); static String Lpad( String valueToPad, String filler, int size ); static String Rpad( String valueToPad, String filler, int size ); static boolean classIsOrExtends( Class<?> clazz, Class<?> superClass ); static String getDeprecatedPrefix(); }
Const { public static double round( double f, int places ) { return round( f, places, java.math.BigDecimal.ROUND_HALF_EVEN ); }  static double round( double f, int places ); static double round( double f, int places, int roundingMode ); static BigDecimal round( BigDecimal f, int places, int roundingMode ); static long round( long f, int places, int roundingMode ); static int toInt( String str, int def ); static long toLong( String str, long def ); static double toDouble( String str, double def ); static Date toDate( String str, Date def ); static boolean isSpace( char c ); static String ltrim( String source ); static String rtrim( String source ); static String trim( String str ); static String rightPad( String ret, int limit ); static String rightPad( StringBuffer ret, int limit ); static String rightPad( StringBuilder ret, int limit ); static String replace( String string, String repl, String with ); static void repl( StringBuffer str, String code, String repl ); static void repl( StringBuilder str, String code, String repl ); static int nrSpacesBefore( String field ); static int nrSpacesAfter( String field ); static boolean onlySpaces( String str ); static String getOS(); static String getQuoteCharByOS(); static String optionallyQuoteStringByOS( String string ); static boolean isWindows(); static boolean isLinux(); static boolean isOSX(); static boolean isKDE(); static String getHostname(); static String getHostnameReal(); static String getIPAddress(); static String getIPAddress( String networkInterfaceName ); static String getMACAddress(); static String getUserHomeDirectory(); static String getKettleDirectory(); static String getUserBaseDir(); static String getDIHomeDirectory(); static String getSharedObjectsFile(); static String getKettleLocalRepositoriesFile(); static String getKettleUserRepositoriesFile(); static String getKettleLocalCartePasswordFile(); static String getKettleCartePasswordFile(); static String getBaseDocUrl(); static String getDocUrl( final String uri ); static String getEnvironmentVariable( String variable, String deflt ); @Deprecated static String replEnv( String string ); @Deprecated static String[] replEnv( String[] string ); static String NVL( String source, String def ); static String nullToEmpty( String source ); static int indexOfString( String lookup, String[] array ); static int[] indexsOfStrings( String[] lookup, String[] array ); static int[] indexsOfFoundStrings( String[] lookup, String[] array ); static int indexOfString( String lookup, List<String> list ); static String[] sortStrings( String[] input ); static String[] splitString( String string, String separator ); static String[] splitString( String string, char separator ); static String[] splitString( String string, char separator, boolean escape ); static String[] splitPath( String path, String separator ); static String[] splitString( String stringToSplit, String delimiter, String enclosure ); static String[] splitString( String stringToSplit, String delimiter, String enclosure, boolean removeEnclosure ); static String[] getDistinctStrings( String[] strings ); static String getStackTracker( Throwable e ); static String getClassicStackTrace( Throwable e ); static String getCustomStackTrace( Throwable aThrowable ); @Deprecated static boolean isEmpty( String val ); @Deprecated static boolean isEmpty( StringBuffer val ); @Deprecated static boolean isEmpty( String[] vals ); @Deprecated static boolean isEmpty( CharSequence val ); @Deprecated static boolean isEmpty( CharSequence[] vals ); @Deprecated static boolean isEmpty( Object[] array ); @Deprecated static boolean isEmpty( List<?> list ); static ClassLoader createNewClassLoader(); static byte[] createByteArray( int size ); static String initCap( String string ); static String createFilename( String name ); static String createFilename( String directory, String name, String extension ); static String createName( String filename ); static String filenameOnly( String sFullPath ); static String[] getDateFormats(); static String[] getNumberFormats(); static String[] getConversionFormats(); static String[] getTransformationAndJobFilterNames(); static String[] getTransformationFilterNames(); static String[] getJobFilterNames(); static long nanoTime(); static String trimToType( String string, int trimType ); static String safeAppendDirectory( String dir, String file ); static String[] getEmptyPaddedStrings(); static int getPercentageFreeMemory(); static String removeDigits( String input ); static String getDigitsOnly( String input ); static Date removeTimeFromDate( Date input ); static String escapeXML( String content ); static String escapeHtml( String content ); static String unEscapeHtml( String content ); static String unEscapeXml( String content ); static String escapeSQL( String content ); static String removeCRLF( String in ); static String removeChar( String in, char badChar ); static String removeCR( String in ); static String removeLF( String in ); static String removeTAB( String in ); static Date addTimeToDate( Date input, String time, String DateFormat ); static int decodeTime( String s, String DateFormat ); static int getOccurenceString( String string, String searchFor ); static String[] GetAvailableFontNames(); static String getKettlePropertiesFileHeader(); static String protectXMLCDATA( String content ); static int getOcuranceString( String string, String searchFor ); static String escapeXml( String content ); static String Lpad( String valueToPad, String filler, int size ); static String Rpad( String valueToPad, String filler, int size ); static boolean classIsOrExtends( Class<?> clazz, Class<?> superClass ); static String getDeprecatedPrefix(); @Deprecated
  static final String VERSION; static final String COPYRIGHT_YEAR; static final int TIMEOUT_GET_MILLIS; static final int TIMEOUT_PUT_MILLIS; static final int ROWS_UPDATE; static final int ROWS_IN_ROWSET; static final int FETCH_SIZE; static final int SORT_SIZE; static final int HEARTBEAT_PERIODIC_INTERVAL_IN_SECS; static final String FILE_SEPARATOR; static final String PATH_SEPARATOR; static final String CR; static final String DOSCR; static final String EMPTY_STRING; static final String JAVA_VERSION; @Deprecated
  static final String USER_HOME_DIRECTORY; static String JNDI_DIRECTORY; static final String PLUGIN_BASE_FOLDERS_PROP; static final String DEFAULT_PLUGIN_BASE_FOLDERS; static final Date MIN_DATE; static final Date MAX_DATE; static final int MIN_YEAR; static final int MAX_YEAR; static final int RIGHT; static final int LENGTH; static final int MARGIN; static final int MIDDLE_PCT; static final int ARROW_WIDTH; static final int FORM_MARGIN; static final int SHADOW_SIZE; static final int SYMBOLSIZE; static final int MAX_FILE_HIST; static final Locale DEFAULT_LOCALE; static final char DEFAULT_DECIMAL_SEPARATOR; static final char DEFAULT_GROUPING_SEPARATOR; static final String DEFAULT_CURRENCY_SYMBOL; static final String DEFAULT_NUMBER_FORMAT; static final String NULL_STRING; static final String NULL_NUMBER; static final String NULL_DATE; static final String NULL_BIGNUMBER; static final String NULL_BOOLEAN; static final String NULL_INTEGER; static final String NULL_BINARY; static final String NULL_NONE; static final int ROUND_HALF_CEILING; static final String CHEF_LOG_FILE; static final String SPOON_LOG_FILE; static final String MENU_LOG_FILE; static final String GENERALIZED_DATE_TIME_FORMAT; static final String GENERALIZED_DATE_TIME_FORMAT_MILLIS; static final String XML_ENCODING; static final String[] STRING_TRANS_AND_JOB_FILTER_EXT; static final String STRING_TRANS_DEFAULT_EXT; static final String[] STRING_TRANS_FILTER_EXT; static final String STRING_JOB_DEFAULT_EXT; static final String[] STRING_JOB_FILTER_EXT; static final String KETTLE_PROPERTIES; static final String SHARED_DATA_FILE; static final String INTERNAL_VARIABLE_PREFIX; static final String INTERNAL_VARIABLE_KETTLE_VERSION; static final String INTERNAL_VARIABLE_KETTLE_BUILD_VERSION; static final String INTERNAL_VARIABLE_KETTLE_BUILD_DATE; static final String INTERNAL_VARIABLE_JOB_FILENAME_DIRECTORY; static final String INTERNAL_VARIABLE_JOB_FILENAME_NAME; static final String INTERNAL_VARIABLE_JOB_NAME; static final String INTERNAL_VARIABLE_JOB_REPOSITORY_DIRECTORY; static final String INTERNAL_VARIABLE_JOB_RUN_ID; static final String INTERNAL_VARIABLE_JOB_RUN_ATTEMPTNR; static final String VARIABLE_HEARTBEAT_PERIODIC_INTERVAL_SECS; static final String VARIABLE_MONITORING_SNMP_TRAPS_ENABLED; static final String INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY; static final String[] INTERNAL_TRANS_VARIABLES; static final String[] INTERNAL_JOB_VARIABLES; static final String[] DEPRECATED_VARIABLES; static final String INTERNAL_VARIABLE_TRANSFORMATION_FILENAME_DIRECTORY; static final String INTERNAL_VARIABLE_TRANSFORMATION_FILENAME_NAME; static final String INTERNAL_VARIABLE_TRANSFORMATION_NAME; static final String INTERNAL_VARIABLE_TRANSFORMATION_REPOSITORY_DIRECTORY; static final String INTERNAL_VARIABLE_STEP_PARTITION_ID; static final String INTERNAL_VARIABLE_STEP_PARTITION_NR; static final String INTERNAL_VARIABLE_SLAVE_SERVER_NUMBER; static final String INTERNAL_VARIABLE_SLAVE_SERVER_NAME; static final String INTERNAL_VARIABLE_CLUSTER_SIZE; static final String INTERNAL_VARIABLE_STEP_UNIQUE_NUMBER; static final String INTERNAL_VARIABLE_CLUSTER_MASTER; static final String INTERNAL_VARIABLE_CLUSTER_RUN_ID; static final String INTERNAL_VARIABLE_STEP_UNIQUE_COUNT; static final String INTERNAL_VARIABLE_STEP_NAME; static final String INTERNAL_VARIABLE_STEP_COPYNR; static final int MAX_NR_LOG_LINES; static final int MAX_NR_HISTORY_LINES; static final int HISTORY_LINES_FETCH_SIZE; static final int MAX_LOG_LINE_TIMEOUT_MINUTES; static final int WARNING; static final int ERROR; static final int INFO; static final int NOTE_MARGIN; static final int MAX_UNDO; static final String KETTLE_VARIABLES_FILE; static final String KETTLE_LOG_SIZE_LIMIT; static final String KETTLE_TRANS_LOG_DB; static final String KETTLE_TRANS_LOG_SCHEMA; static final String KETTLE_TRANS_LOG_TABLE; static final String KETTLE_JOB_LOG_DB; static final String KETTLE_JOB_LOG_SCHEMA; static final String KETTLE_SLAVE_DETECTION_TIMER; static final String KETTLE_JOB_LOG_TABLE; static final String KETTLE_TRANS_PERFORMANCE_LOG_DB; static final String KETTLE_TRANS_PERFORMANCE_LOG_SCHEMA; static final String KETTLE_TRANS_PERFORMANCE_LOG_TABLE; static final String KETTLE_JOBENTRY_LOG_DB; static final String KETTLE_JOBENTRY_LOG_SCHEMA; static final String KETTLE_JOBENTRY_LOG_TABLE; static final String KETTLE_STEP_LOG_DB; static final String KETTLE_STEP_LOG_SCHEMA; static final String KETTLE_STEP_LOG_TABLE; static final String KETTLE_CHANNEL_LOG_DB; static final String KETTLE_CHANNEL_LOG_SCHEMA; static final String KETTLE_CHANNEL_LOG_TABLE; static final String KETTLE_METRICS_LOG_DB; static final String KETTLE_METRICS_LOG_SCHEMA; static final String KETTLE_METRICS_LOG_TABLE; static final String KETTLE_CHECKPOINT_LOG_DB; static final String KETTLE_CHECKPOINT_LOG_SCHEMA; static final String KETTLE_CHECKPOINT_LOG_TABLE; static final String KETTLE_SHARED_OBJECTS; static final String KETTLE_EMPTY_STRING_DIFFERS_FROM_NULL; static final String KETTLE_LENIENT_STRING_TO_NUMBER_CONVERSION; static final String KETTLE_COMPATIBILITY_DB_IGNORE_TIMEZONE; static final String KETTLE_COMPATIBILITY_IMPORT_PATH_ADDITION_ON_VARIABLES; static final String KETTLE_COMPATIBILITY_IGNORE_TABLE_LOGGING; static final String KETTLE_COMPATIBILITY_TEXT_FILE_OUTPUT_APPEND_NO_HEADER; static final String KETTLE_COMPATIBILITY_MERGE_ROWS_USE_REFERENCE_STREAM_WHEN_IDENTICAL; static final String KETTLE_COMPATIBILITY_MEMORY_GROUP_BY_SUM_AVERAGE_RETURN_NUMBER_TYPE; static final String KETTLE_SYSTEM_HOSTNAME; static final String KETTLE_MAX_LOG_SIZE_IN_LINES; static final String KETTLE_MAX_LOG_TIMEOUT_IN_MINUTES; static final String KETTLE_REDIRECT_STDERR; static final String KETTLE_REDIRECT_STDOUT; static final String KETTLE_CARTE_OBJECT_TIMEOUT_MINUTES; static final String KETTLE_STEP_PERFORMANCE_SNAPSHOT_LIMIT; static final String KETTLE_MAX_JOB_TRACKER_SIZE; static final String KETTLE_MAX_JOB_ENTRIES_LOGGED; static final String KETTLE_MAX_LOGGING_REGISTRY_SIZE; static final String KETTLE_LOG_TAB_REFRESH_DELAY; static final String KETTLE_LOG_TAB_REFRESH_PERIOD; static final String KETTLE_SAP_CONNECTION_FACTORY; static final String KETTLE_SAP_CONNECTION_FACTORY_DEFAULT_NAME; static final String KETTLE_PLUGIN_CLASSES; static final String KETTLE_PLUGIN_PACKAGES; static final String KETTLE_TRANS_ROWSET_SIZE; static final String VERSION_COMMENT_INITIAL_VERSION; static final String VERSION_COMMENT_EDIT_VERSION; static final String XML_FILE_KETTLE_STEPS; static final String KETTLE_CORE_STEPS_FILE; static final String XML_FILE_KETTLE_PARTITION_PLUGINS; static final String KETTLE_CORE_JOBENTRIES_FILE; static final String XML_FILE_KETTLE_SERVLETS; static final String XML_FILE_KETTLE_VALUEMETA_PLUGINS; static final String XML_FILE_KETTLE_PASSWORD_ENCODER_PLUGINS; static final String KETTLE_VALUEMETA_PLUGINS_FILE; static final String KETTLE_PASSWORD_ENCODER_PLUGIN; static final String KETTLE_PASSWORD_ENCODER_PLUGINS_FILE; static final String KETTLE_TWO_WAY_PASSWORD_ENCODER_SEED; static final String XML_FILE_KETTLE_LOGGING_PLUGINS; static final String KETTLE_LOGGING_PLUGINS_FILE; static final String KETTLE_CORE_SERVLETS_FILE; static final String KETTLE_ROWSET_GET_TIMEOUT; static final String KETTLE_ROWSET_PUT_TIMEOUT; static final String KETTLE_BATCHING_ROWSET; static final String KETTLE_DISABLE_CONSOLE_LOGGING; static final String XML_FILE_KETTLE_JOB_ENTRIES; static final String XML_FILE_KETTLE_REPOSITORIES; static final String XML_FILE_KETTLE_DATABASE_TYPES; static final String XML_FILE_KETTLE_COMPRESSION_PROVIDERS; static final String XML_FILE_KETTLE_AUTHENTICATION_PROVIDERS; static final String XML_FILE_KETTLE_EXTENSION_POINTS; static final String XML_FILE_KETTLE_REGISTRY_EXTENSIONS; static final String XML_FILE_KETTLE_LIFECYCLE_LISTENERS; static final String XML_FILE_KETTLE_ENGINES; static final String KETTLE_TRANS_PAN_JVM_EXIT_CODE; static final String KETTLE_DEFAULT_NUMBER_FORMAT; static final String KETTLE_DEFAULT_BIGNUMBER_FORMAT; static final String KETTLE_DEFAULT_INTEGER_FORMAT; static final String KETTLE_DEFAULT_DATE_FORMAT; static final String KETTLE_AGGREGATION_MIN_NULL_IS_VALUED; static final String KETTLE_AGGREGATION_ALL_NULLS_ARE_ZERO; static final String KETTLE_DEFAULT_TIMESTAMP_FORMAT; static final String KETTLE_SPLIT_FIELDS_REMOVE_ENCLOSURE; static final String KETTLE_GLOBAL_LOG_VARIABLES_CLEAR_ON_EXPORT; static final String KETTLE_COMPATIBILITY_CALCULATION_TIMEZONE_DECOMPOSITION; static final String KETTLE_COMPATIBILITY_SET_ERROR_ON_SPECIFIC_JOB_ENTRIES; static final String KETTLE_COMPATIBILITY_SEND_RESULT_XML_WITH_FULL_STATUS; static final String KETTLE_COMPATIBILITY_SELECT_VALUES_TYPE_CHANGE_USES_TYPE_DEFAULTS; static final String XML_FILE_KETTLE_IMPORT_RULES; static final ReleaseType RELEASE; static final String PENTAHO_METASTORE_FOLDER; static final String PENTAHO_METASTORE_NAME; static final String KETTLE_LOG_MARK_MAPPINGS; static final String KETTLE_CARTE_JETTY_ACCEPTORS; static final String KETTLE_CARTE_JETTY_ACCEPT_QUEUE_SIZE; static final String KETTLE_CARTE_JETTY_RES_MAX_IDLE_TIME; static final String VFS_USER_DIR_IS_ROOT; }