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

org.xmlet.htmlapi.TextFunction Maven / Gradle / Ivy

Go to download

Uses XsdAsm to generate a fluent API that allows the creation of HTML5 documents.

The newest version!
package org.xmlet.htmlapi;

import java.util.function.Function;

public class TextFunction extends AbstractElement, Z> {
   private Function textFunction;

   private TextFunction() {
      super("text");
   }

   public TextFunction(Z parent, Function textFunction) {
      super(parent, "text");
      this.textFunction = textFunction;
   }

   public TextFunction self() {
      return this;
   }

   public void accept(ElementVisitor visitor) {
      visitor.visit(this);
   }

   public U getValue(R model) {
      return this.textFunction == null ? null : this.textFunction.apply(model);
   }

   public TextFunction cloneElem() {
      return (TextFunction)this.clone(new TextFunction());
   }

   public TextFunction addAttr(Attribute var1) {
      throw new UnsupportedOperationException("Text element can't contain attributes.");
   }

   public TextFunction addChild(Element var1) {
      throw new UnsupportedOperationException("Text element can't contain children.");
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy