Example usage for org.apache.commons.beanutils.converters LongConverter convert

List of usage examples for org.apache.commons.beanutils.converters LongConverter convert

Introduction

In this page you can find the example usage for org.apache.commons.beanutils.converters LongConverter convert.

Prototype

public Object convert(Class type, Object value) 

Source Link

Document

Convert the specified input object into an output object of the specified type.

Usage

From source file:com.sunchenbin.store.feilong.core.bean.ConvertUtil.java

/**
 * ?long./*from  www.  j  a v a 2  s .  com*/
 * 
 * <p>
 * converted is missing or an error occurs converting the value,<span style="color:red">return null</span>
 * </p>
 *
 * @param toBeConvertedValue
 *            ?.
 * @return the long
 * @see #convert(Object, Class)
 * @see org.apache.commons.beanutils.converters.LongConverter
 */
public static Long toLong(Object toBeConvertedValue) {
    LongConverter longConverter = new LongConverter(null);
    return longConverter.convert(Long.class, toBeConvertedValue);
}

From source file:jp.co.acroquest.endosnipe.report.converter.util.calc.LongCalculator.java

public Object immediate(String str) {
    LongConverter converter = new LongConverter();
    return converter.convert(Long.class, str);
}