io.rtdi.bigdata.connector.properties.atomic.PropertyInt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipelinefoundation Show documentation
Show all versions of pipelinefoundation Show documentation
The abstraction of an Apache Kafka-like Pipeline and common classes/interfaces.
package io.rtdi.bigdata.connector.properties.atomic;
import io.rtdi.bigdata.connector.pipeline.foundation.exceptions.PropertiesException;
public class PropertyInt extends PropertyAbstract implements IPropertyValue {
protected Integer value;
public PropertyInt() {
super();
}
public PropertyInt(String name, Integer value) {
this(name, null, null, null, value, null);
}
public PropertyInt(String name, String displayname, String description, String icon, Integer defaultvalue, Boolean mandatory) {
super(name, displayname, description, icon, mandatory);
setValue(defaultvalue);
}
public void setValue(Integer value) {
this.value = value;
}
@Override
public Integer getValue() {
return value;
}
@Override
public void parseValue(IProperty property, boolean ignorepasswords) throws PropertiesException {
if (property instanceof PropertyInt) {
this.value = ((PropertyInt) property).getValue();
} else {
throw new PropertiesException("PropertyInt's value not of type PropertyInt");
}
}
@Override
public String toString() {
return String.valueOf(value);
}
@Override
public boolean hasValue() {
return value != null;
}
@Override
public IProperty clone(boolean ignorepasswords) {
return new PropertyInt(this.getName(), this.getDisplayname(), this.getDescription(), this.getIcon(), this.getValue(), this.getMandatory());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy