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

org.xmlet.regexapi.GroupName Maven / Gradle / Ivy

package org.xmlet.regexapi;

import java.util.function.Consumer;

public final class GroupName implements CustomAttributeGroup, Z>, TextGroup, Z> {
   protected final Z parent;
   protected final ElementVisitor visitor;

   public GroupName(ElementVisitor visitor) {
      this.visitor = visitor;
      this.parent = null;
      visitor.visitElementGroupName(this);
   }

   public GroupName(Z parent) {
      this.parent = parent;
      this.visitor = parent.getVisitor();
      this.visitor.visitElementGroupName(this);
   }

   protected GroupName(Z parent, ElementVisitor visitor, boolean shouldVisit) {
      this.parent = parent;
      this.visitor = visitor;
      if (shouldVisit) {
         visitor.visitElementGroupName(this);
      }

   }

   public Z __() {
      this.visitor.visitParentGroupName(this);
      return this.parent;
   }

   public final GroupName dynamic(Consumer> consumer) {
      this.visitor.visitOpenDynamic();
      consumer.accept(this);
      this.visitor.visitCloseDynamic();
      return this;
   }

   public final GroupName 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 "groupName";
   }

   public final GroupName self() {
      return this;
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy