/* * [EndItem.java] * * Summary: represents a [End of Search and Replace Script] comment. * * Copyright: (c) 2011-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: * 1.0 2011-11-13 initial version */ package com.mindprod.sortsrs; /** * represents a [End of Search and Replace Script] comment. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2011-11-13 initial version * @since 2011-11-13 */ class EndItem extends Item { /** * Constructor */ public EndItem() { this.section = 3; } /** * compose a 2-line Path item, with lead \r n but no trailing \r\n( * * @param stripComments true if should strip out comments * * @return chars as they appear is reconstructed script, starting with \r\n, but not not ending with it. */ String combine( final boolean stripComments ) { // we don't deal with any options or comment. return "\r\n[End of Search and Replace Script]"; // without trailing \r\n } /** * create new End Item. We don't bother with the comment. We will strip it. * * @return Endtem */ public static EndItem create() { return new EndItem(); } /** * show all just the path data, not the comments * * @return search/options/replace */ public String toString() { // leave out comments. return "-End-"; } }