001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.bean.html5;
018
019import org.apache.juneau.marshall.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-samp-element">&lt;samp&gt;</a>
023 * element.
024 *
025 * <p>
026 * The samp element represents sample or quoted output from a computer program or system. It is
027 * used to mark up text that represents the output of a program, command, or system, such as
028 * console output, error messages, or program results. The samp element is typically rendered
029 * in a monospace font and is commonly used in documentation, tutorials, and technical writing
030 * to distinguish program output from regular text.
031 *
032 * <h5 class='section'>Examples:</h5>
033 * <p class='bcode w800'>
034 *    <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*;
035 *
036 *    <jc>// Simple sample output</jc>
037 *    Samp <jv>simple</jv> = <jsm>samp</jsm>(<js>"Hello World"</js>);
038 *
039 *    <jc>// Samp with styling</jc>
040 *    Samp <jv>styled</jv> = <jsm>samp</jsm>(<js>"$ npm install"</js>)
041 *       .class_(<js>"console-output"</js>);
042 *
043 *    <jc>// Samp with complex content</jc>
044 *    Samp <jv>complex</jv> = <jsm>samp</jsm>(
045 *       <js>"Error: "</js>,
046 *       <jsm>strong</jsm>(<js>"File not found"</js>),
047 *       <js>" at line 42"</js>
048 *    );
049 *
050 *    <jc>// Samp with ID</jc>
051 *    Samp <jv>withId</jv> = <jsm>samp</jsm>(<js>"Sample output with ID"</js>)
052 *       .id(<js>"sample-output"</js>);
053 *
054 *    <jc>// Samp with styling</jc>
055 *    Samp <jv>styled2</jv> = <jsm>samp</jsm>(<js>"Custom styled sample output"</js>)
056 *       .style(<js>"background-color: #f4f4f4; padding: 5px; border: 1px solid #ddd;"</js>);
057 *
058 *    <jc>// Samp with multiple elements</jc>
059 *    Samp <jv>multiple</jv> = <jsm>samp</jsm>(
060 *       <js>"$ "</js>,
061 *       <jsm>samp</jsm>(<js>"ls -la"</js>),
062 *       <js>"\n"</js>,
063 *       <jsm>samp</jsm>(<js>"total 24"</js>),
064 *       <js>"\n"</js>,
065 *          new Samp().children("drwxr-xr-x  5 user  staff  160 Jan 15 10:30 .")
066 *       );
067 *
068 *    // Samp with links
069 *    Samp withLinks = new Samp()
070 *       .children(
071 *          "See ",
072 *          new A().href("/docs/output").children("output documentation"),
073 *          " for more details."
074 *       );
075 * </p>
076 *
077 * <h5 class='section'>See Also:</h5><ul>
078 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
079 * </ul>
080 */
081@Marshalled(typeName = "samp")
082public class Samp extends HtmlElementMixed<Samp> {
083
084   /**
085    * Creates an empty {@link Samp} element.
086    */
087   public Samp() {}
088
089   /**
090    * Creates a {@link Samp} element with the specified child nodes.
091    *
092    * @param children The child nodes. Must not be <jk>null</jk>.
093    */
094   public Samp(Object...children) {
095      children(children);
096   }
097}