All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.panayotis.xray.props.commons.LongPropertyManager Maven / Gradle / Ivy

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.panayotis.xray.props.commons;

import java.lang.reflect.Method;

public class LongPropertyManager extends DefaultPropertyManager {

    public LongPropertyManager(Object instance, String name, Method setter, Method getter) {
        super(instance, name, setter, getter);
    }

    @Override
    protected Integer convertValue(Object value) {
        try {
            if (value != null)
                return Integer.valueOf(value.toString());
        } catch (NumberFormatException ex) {
        }
        return null;
    }

    @Override
    public Integer defaultValue() {
        return 0;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy