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

com.talk2object.plum.interaction.view.annotation.parameter.helper.IntegerParameterWrapper Maven / Gradle / Ivy

There is a newer version: 0.1.22
Show newest version
package com.talk2object.plum.interaction.view.annotation.parameter.helper;

import org.apache.commons.lang3.ArrayUtils;

import com.talk2object.plum.interaction.rich.field.InteractiveField;
import com.talk2object.plum.interaction.view.annotation.parameter.IntegerParameter;

public class IntegerParameterWrapper extends AbstractParameterWrapper {

	IntegerParameter getIntegerParameter() {
		return (IntegerParameter) parameter;
	}

	@Override
	public Object getInitValue() {
		return getIntegerParameter().initValue();
	}

	@Override
	Object[] getOptionValues() {
		Integer[] array = ArrayUtils.toObject(getIntegerParameter().options());

		return array;
	}

	@Override
	public void enrich(InteractiveField input) {
		super.enrich(input);

		input.setNullable(false);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy