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

org.umlg.javageneration.validation.RangeReal Maven / Gradle / Ivy

There is a newer version: 2.0.15
Show newest version
package org.umlg.javageneration.validation;

import org.umlg.java.metamodel.OJPathName;


public class RangeReal implements Validation {
	private Double min;
	private Double max;

	public RangeReal(Double min, Double max) {
		super();
		this.min = min;
		this.max = max;
	}

	public Number getMin() {
		return min;
	}

	public Number getMax() {
		return max;
	}

	@Override
	public String toStringForMethod() {
		return getMin().toString() + ", " + getMax().toString();
	}

	@Override
	public String toNewRuntimeTumlValidation() {
		return "new RangeReal(" + min.toString() + ", " + max.toString() + ")";
	}
	
	@Override
	public OJPathName getPathName() {
		return new OJPathName("org.umlg.runtime.validation.RangeReal");
	}
	
	@Override
	public String toJson() {
		return "\\\"range\\\": {\\\"min\\\": " + String.valueOf(min) + ", \\\"max\\\": " + String.valueOf(max) + "}";
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy