//
// https://www.ramecera.it/myscrewdriver.html
// e-mail: screwdriver@ramecera.it
//
/* This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License v1.0 which accompanies this
 * distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html */
package it.ramecera.screwdriver.utilities;

import it.ramecera.screwdriver.Wagon;

/**
 * <p>
 * Creation date: 2020-04-09<br>
 * Last updated: 2020-04-09<br>
 * </p>
 * 
 * @author M.Maglioni */
public class ValidConstScrew {

	/** Creation date: 2020-04-09<br>
	 * Last updated: 2020-04-09<br>
	 * 
	 * @author M.Maglioni
	 * @param valcons constants
	 * @param valparams parameters
	 * @param valtag tag */
	public ValidConstScrew(Wagon valcons, Wagon valparams,
			Wagon valtag) {
		super();
		this.valcons = valcons;
		this.valparams = valparams;
		this.valtag = valtag;
	}

	/** the name of the validation constraint */
	public Wagon valcons;
	/** parameters */
	public Wagon valparams;
	/** message tag to be produced in case of error */
	public Wagon valtag;

	/**
	 * <p>
	 * Classic toString method.
	 * </p>
	 * <p>
	 * Creation date: 2020-04-09<br>
	 * Last updated: 2020-04-09
	 * </p>
	 * <p>
	 * Modifications:<br>
	 * </p>
	 * 
	 * @return the compound string
	 * @author M. Maglioni */
	public String toString() {
		String s = "";
		if (valcons != null) {
			s += "VC constraint=" + valcons.text;
		}
		if (valparams != null) {
			s += "; VC parametri=" + valparams.text;
		}
		if (valtag != null) {
			s += "; VC tag=" + valtag.text;
		}
		return s;
	}

}
