@Test public void testSmartParseIntSIUnitOk() { assertEquals( 4000, NumberUtils.smartParseInt( "4k", UnitDefinition.SI ) ); assertEquals( 4000, NumberUtils.smartParseInt( "4K", UnitDefinition.SI ) ); assertEquals( 4000000, NumberUtils.smartParseInt( "4M", UnitDefinition.SI ) ); assertEquals( 4000000, NumberUtils.smartParseInt( "4 M", UnitDefinition.SI ) ); assertEquals( 4000000, NumberUtils.smartParseInt( "4 MB", UnitDefinition.SI ) ); }
public static int smartParseInt( final String aText ) { return smartParseInt( aText, 0 ); }
NumberUtils { public static int smartParseInt( final String aText ) { return smartParseInt( aText, 0 ); } }
NumberUtils { public static int smartParseInt( final String aText ) { return smartParseInt( aText, 0 ); } private  NumberUtils(); }
NumberUtils { public static int smartParseInt( final String aText ) { return smartParseInt( aText, 0 ); } private  NumberUtils(); static int convertBitOrder( final int aValue, final int aBitCount, final BitOrder aBitOrder ); static int convertByteOrder( final int aValue, final int aByteCount, final ByteOrder aByteOrder ); static Comparator<T> createNumberComparator( final boolean aSortAscending ); static int getBitIndex( final int aMaskValue ); static int getBitMask( final int aBitCount ); static int getPercentage( final int aValue, final int aRange ); static int getPercentage( final int aValue, final int aLowerBound, final int aUpperBound ); static int getPercentage( final long aValue, final long aRange ); static int getPercentage( final long aValue, final long aLowerBound, final long aUpperBound ); static boolean isPowerOfTwo( final int aValue ); static int packBytes( final int aValue ); static int reverseBits( final int aValue, final int aBitCount ); static int safeParseInt( final String aText ); static int safeParseInt( final String aText, final int aDefault ); static long safeParseLong( final String aText ); static long safeParseLong( final String aText, final long aDefault ); static int smartParseInt( final String aText ); static int smartParseInt( final String aText, final int aDefault ); static int smartParseInt( final String aText, final UnitDefinition aUnitDefinition ); static int smartParseInt( final String aText, final UnitDefinition aUnitDefinition, final int aDefault ); }
NumberUtils { public static int smartParseInt( final String aText ) { return smartParseInt( aText, 0 ); } private  NumberUtils(); static int convertBitOrder( final int aValue, final int aBitCount, final BitOrder aBitOrder ); static int convertByteOrder( final int aValue, final int aByteCount, final ByteOrder aByteOrder ); static Comparator<T> createNumberComparator( final boolean aSortAscending ); static int getBitIndex( final int aMaskValue ); static int getBitMask( final int aBitCount ); static int getPercentage( final int aValue, final int aRange ); static int getPercentage( final int aValue, final int aLowerBound, final int aUpperBound ); static int getPercentage( final long aValue, final long aRange ); static int getPercentage( final long aValue, final long aLowerBound, final long aUpperBound ); static boolean isPowerOfTwo( final int aValue ); static int packBytes( final int aValue ); static int reverseBits( final int aValue, final int aBitCount ); static int safeParseInt( final String aText ); static int safeParseInt( final String aText, final int aDefault ); static long safeParseLong( final String aText ); static long safeParseLong( final String aText, final long aDefault ); static int smartParseInt( final String aText ); static int smartParseInt( final String aText, final int aDefault ); static int smartParseInt( final String aText, final UnitDefinition aUnitDefinition ); static int smartParseInt( final String aText, final UnitDefinition aUnitDefinition, final int aDefault );  }