se.unlogic.standardutils.numbers
Class NumberUtils

java.lang.Object
  extended by se.unlogic.standardutils.numbers.NumberUtils

public class NumberUtils
extends Object


Constructor Summary
NumberUtils()
           
 
Method Summary
static String formatNumber(Number value, int minDecimals, int maxDecimals, boolean grouping, boolean dotDecimalSymbol)
           
static Long getNumbers(String revstring)
           
static boolean isDouble(String value)
           
static boolean isFloat(String value)
           
static boolean isInt(String value)
           
static boolean isLong(Double value)
           
static boolean isLong(String value)
           
static boolean isNumber(String value)
           
static Byte toByte(String value)
           
static List<Double> toDouble(List<String> values)
           
static Double toDouble(String value)
           
static Float toFloat(String value)
           
static List<Integer> toInt(Collection<? extends Object> list, Field field)
           
static ArrayList<Integer> toInt(Collection<String> values)
           
static Integer toInt(String value)
           
static ArrayList<Integer> toInt(String[] values)
           
static List<Long> toLong(List<String> values)
           
static Long toLong(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberUtils

public NumberUtils()
Method Detail

isLong

public static boolean isLong(Double value)

isInt

public static boolean isInt(String value)

isLong

public static boolean isLong(String value)

isFloat

public static boolean isFloat(String value)

isDouble

public static boolean isDouble(String value)

isNumber

public static boolean isNumber(String value)

toInt

public static Integer toInt(String value)

toInt

public static List<Integer> toInt(Collection<? extends Object> list,
                                  Field field)
                           throws IllegalArgumentException,
                                  IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

toInt

public static ArrayList<Integer> toInt(Collection<String> values)

toInt

public static ArrayList<Integer> toInt(String[] values)

toLong

public static Long toLong(String value)

toFloat

public static Float toFloat(String value)

toDouble

public static Double toDouble(String value)

toDouble

public static List<Double> toDouble(List<String> values)

toLong

public static List<Long> toLong(List<String> values)

getNumbers

public static Long getNumbers(String revstring)

formatNumber

public static String formatNumber(Number value,
                                  int minDecimals,
                                  int maxDecimals,
                                  boolean grouping,
                                  boolean dotDecimalSymbol)

toByte

public static Byte toByte(String value)


Copyright © 2011. All Rights Reserved.