org.xmlet.regexapi.OneOrMore Maven / Gradle / Ivy
package org.xmlet.regexapi;
import java.util.function.Consumer;
public final class OneOrMore implements CustomAttributeGroup, Z>, MatchingOperationsAll1, Z> {
protected final Z parent;
protected final ElementVisitor visitor;
public OneOrMore(ElementVisitor visitor) {
this.visitor = visitor;
this.parent = null;
visitor.visitElementOneOrMore(this);
}
public OneOrMore(Z parent) {
this.parent = parent;
this.visitor = parent.getVisitor();
this.visitor.visitElementOneOrMore(this);
}
protected OneOrMore(Z parent, ElementVisitor visitor, boolean shouldVisit) {
this.parent = parent;
this.visitor = visitor;
if (shouldVisit) {
visitor.visitElementOneOrMore(this);
}
}
public Z __() {
this.visitor.visitParentOneOrMore(this);
return this.parent;
}
public final OneOrMore dynamic(Consumer> consumer) {
this.visitor.visitOpenDynamic();
consumer.accept(this);
this.visitor.visitCloseDynamic();
return this;
}
public final OneOrMore of(Consumer> consumer) {
consumer.accept(this);
return this;
}
public Z getParent() {
return this.parent;
}
public final ElementVisitor getVisitor() {
return this.visitor;
}
public String getName() {
return "oneOrMore";
}
public final OneOrMore self() {
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy