/* * [Stop.java] * * Summary: Describes one Start token for getting display started. * * Copyright: (c) 2004-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 2.0 2009-04-19 tidy comments, more accurate colour names */ package com.mindprod.jtokens; /** * Describes one Start token for getting display started. * * @author Roedy Green, Canadian Mind Products * @version 2.0 2009-04-19 tidy comments, more accurate colour names * @since 2004-04-24 */ public final class Stop extends WhiteSpace { /** * version number for the class */ static final long serialVersionUID = 1L; /** * html snippet used to end an HTML rendering */ private final String stopHTML; /** * Constructor for a Stop token * * @param stopHTML e.g. *

* , to mark the end of the snippet. */ public Stop( String stopHTML ) { super( "" );// not null this.stopHTML = stopHTML; } /** * @inheritDoc */ public String getHTML() { return stopHTML; } /** * Can this token be collapsed with following space or with a following identical token? * * @return true if can be collapsed simply by combinging text */ public boolean isCollapsible() { return false; } /** * Is this token useless? In other words would rendering it have no visible effect? NL and Space are not considered * useless, unless they have 0 counts. Usually a token is useless because it has and empty or null text string. * * @return true if this token can be thrown away as useless */ public boolean isUseless() { return false; } }