/* Numeral -- Automatically generated by TreeBuilder (2024-10-27T16:48Z) */ package de.uni_freiburg.informatik.ultimate.crocotta.ast; import java.util.List; /** * Represents a numeral which is a special form of a language expression. */ public class Numeral extends LanguageExpression { private static final long serialVersionUID = 1L; private static final java.util.function.Predicate VALIDATOR = CrocottaQuery.VALIDATORS.get(Numeral.class); /** * The value of this numeral. */ int value; /** * The constructor taking initial values. * @param value the value of this numeral. */ public Numeral(int value) { super(); this.value = value; assert VALIDATOR == null || VALIDATOR.test(this) : "Invalid Numeral: " + this; } /** * Returns a textual description of this object. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Numeral").append('['); sb.append(value); return sb.append(']').toString(); } /** * Gets the value of this numeral. * @return the value of this numeral. */ public int getValue() { return value; } public List getOutgoingNodes() { List children = super.getOutgoingNodes(); return children; } public void accept(CrocottaAstVisitor visitor) { if (visitor.visit((LanguageExpression)this)) { //visit parent types higher up if necessary } else { return; } visitor.visit(this); } public LanguageExpression accept(CrocottaAstTransformer visitor) { LanguageExpression node = visitor.transform(this); if(node != this){ return node; } return this; } }