
com.inexas.oak.template.Constraint Maven / Gradle / Ivy
package com.inexas.oak.template;
import java.time.*;
import java.util.*;
import com.inexas.oak.*;
import com.inexas.oak.advisory.*;
import com.inexas.oak.dialect.*;
import com.inexas.tad.TadContext;
import com.inexas.util.*;
public abstract class Constraint extends Locus.Base implements Keyed {
public final Object[] values;
protected DataType dataType;
protected Constraint(String[] values) {
this.values = toType(values);
}
protected Constraint(Object[] values) {
this.values = values;
}
/**
* Factory method to construct a new Constraint.
*
* @param type
* The type of the Constraint: regex, choice, ...
* @param values
* A list of 0..* strings that will be parsed into objects
* depending on the type of the Constraint.
* @return The newly created constraint. However if an error is encountered
* the the Advisory is updated and null is returned.
*/
public static Constraint newConstraint(Identifier type, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy