/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by HamletGen. Do NOT edit!
package org.apache.hadoop.yarn.webapp.hamlet2;
import static java.util.EnumSet.of;
import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.ENDTAG;
import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.INLINE;
import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.PRE;
import java.io.PrintWriter;
import java.util.EnumSet;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.yarn.webapp.SubView;
@InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"})
public class Hamlet extends HamletImpl implements HamletSpec._Html {
public Hamlet(PrintWriter out, int nestLevel, boolean wasInline) {
super(out, nestLevel, wasInline);
}
static EnumSet<EOpt> opt(boolean endTag, boolean inline, boolean pre) {
EnumSet<EOpt> opts = of(ENDTAG);
if (!endTag) opts.remove(ENDTAG);
if (inline) opts.add(INLINE);
if (pre) opts.add(PRE);
return opts;
}
public class HTML<T extends __> extends EImp<T> implements HamletSpec.HTML {
public HTML(String name, T parent, EnumSet<EOpt> opts) {
super(name, parent, opts);
}
@Override
public HTML<T> $lang(String value) {
addAttr("lang", value);
return this;
}
@Override
public HTML<T> $dir(Dir value) {
addAttr("dir", value);
return this;
}
@Override
public HEAD<HTML<T>> head() {
closeAttrs();
return head_(this, false);
}
@Override
public BODY<HTML<T>> body() {
closeAttrs();
return body_(this, false);
}
@Override
public BODY<HTML<T>> body(String selector) {
return setSelector(body(), selector);
}
@Override
public BASE<HTML<T>> base() {
closeAttrs();
return base_(this, false);
}
@Override
public HTML<T> base(String href) {
return base().$href(href).__();
}
@Override
public TITLE<HTML<T>> title() {
closeAttrs();
return title_(this, false);
}
@Override
public HTML<T> title(String cdata) {
return title().__(cdata).__();
}
@Override
public STYLE<HTML<T>> style() {
closeAttrs();
return style_(this, false);
}
@Override
public HTML<T> style(Object... lines) {
return style().$type("text/css").__(lines).__();
}
@Override
public LINK<HTML<T>> link() {
closeAttrs();
return link_(this, false);
}
@Override
public HTML<T> link(String href) {
return setLinkHref(link(), href).__();
}
@Override
public META<HTML<T>> meta() {
closeAttrs();
return meta_(this, false);
}
@Override
public HTML<T> meta(String name, String content) {
return meta().$name(name).$content(content).__();
}
@Override
public HTML<T> meta_http(String header, String content) {
return meta().$http_equiv(header).$content(content).__();
}
@Override
public SCRIPT<HTML<T>> script() {
closeAttrs();
return script_(this, false);
}
@Override
public HTML<T> script(String src) {
return setScriptSrc(script(), src).__();
}
@Override
public OBJECT<HTML<T>> object() {
closeAttrs();
return object_(this, true);
}
@Override
public OBJECT<HTML<T>> object(String selector) {
return setSelector(object(), selector);
}
@Override
public TABLE<HTML<T>> table() {
closeAttrs();
return table_(this, false);
}
@Override
public TABLE<HTML<T>> table(String selector) {
return setSelector(table(), selector);
}
@Override
public HTML<T> address(String cdata) {
return address().__(cdata).__();
}
@Override
public ADDRESS<HTML<T>> address() {
closeAttrs();
return address_(this, false);
}
@Override
public P<HTML<T>> p(String selector) {
return setSelector(p(), selector);
}
@Override
public P<HTML<T>> p() {
closeAttrs();
return p_(this, false);
}
@Override
public HTML<T> __(Class<? extends SubView> cls) {
_v(cls);
return this;
}
@Override
public HR<HTML<T>> hr() {
closeAttrs();
return hr_(this, false);
}
@Override
public HTML<T> hr(String selector) {
return setSelector(hr(), selector).__();
}
@Override
public DL<HTML<T>> dl(String selector) {
return setSelector(dl(), selector);
}
@Override
public DL<HTML<T>> dl() {
closeAttrs();
return dl_(this, false);
}
@Override
public DIV<HTML<T>> div(String selector) {
return setSelector(div(), selector);
}
@Override
public DIV<HTML<T>> div() {
closeAttrs();
return div_(this, false);
}
@Override
public BLOCKQUOTE<HTML<T>> blockquote() {
closeAttrs();
return blockquote_(this, false);
}
@Override
public BLOCKQUOTE<HTML<T>> bq() {
closeAttrs();
return blockquote_(this, false);
}
@Override
public HTML<T> h1(String cdata) {
return h1().__(cdata).__();
}
@Override
public H1<HTML<T>> h1() {
closeAttrs();
return h1_(this, false);
}
@Override
public HTML<T> h1(String selector, String cdata) {
return setSelector(h1(), selector).__(cdata).__();
}
@Override
public HTML<T> h2(String cdata) {
return h2().__(cdata).__();
}
@Override
public H2<HTML<T>> h2() {
closeAttrs();
return h2_(this, false);
}
@Override
public HTML<T> h2(String selector, String cdata) {
return setSelector(h2(), selector).__(cdata).__();
}
@Override
public H3<HTML<T>> h3() {
closeAttrs();
return h3_(this, false);
}
@Override
public HTML<T> h3(String cdata) {
return h3().__(cdata).__();
}
@Override
public HTML<T> h3(String selector, String cdata) {
return setSelector(h3(), selector).__(cdata).__();
}
@Override
public H4<HTML<T>> h4() {
closeAttrs();
return h4_(this, false);
}
@Override
public HTML<T> h4(String cdata) {
return h4().__(cdata).__();
}
@Override
public HTML<T> h4(String selector, String cdata) {
return setSelector(h4(), selector).__(cdata).__();
}
@Override
public H5<HTML<T>> h5() {
closeAttrs();
return h5_(this, false);
}
@Override
public HTML<T> h5(String cdata) {
return h5().__(cdata).__();
}
@Override
public HTML<T> h5(String selector, String cdata) {
return setSelector(h5(), selector).__(cdata).__();
}
@Override
public H6<HTML<T>> h6() {
closeAttrs();
return h6_(this, false);
}
@Override
public HTML<T> h6(String cdata) {
return h6().__(cdata).__();
}
@Override
public HTML<T> h6(String selector, String cdata) {
return setSelector(h6(), selector).__(cdata).__();
}
@Override
public UL<HTML<T>> ul() {
closeAttrs();
return ul_(this, false);
}
@Override
public UL<HTML<T>> ul(String selector) {
return setSelector(ul(