From 4f71d4ff0d1e7ff4607b58eb7d030bd860e44f3a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 4 Apr 2020 03:02:28 +0000 Subject: CTAN sync 202004040302 --- .../arara/ruleset/DirectiveAssembler.kt | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 support/arara/source/src/main/kotlin/org/islandoftex/arara/ruleset/DirectiveAssembler.kt (limited to 'support/arara/source/src/main/kotlin/org/islandoftex/arara/ruleset/DirectiveAssembler.kt') diff --git a/support/arara/source/src/main/kotlin/org/islandoftex/arara/ruleset/DirectiveAssembler.kt b/support/arara/source/src/main/kotlin/org/islandoftex/arara/ruleset/DirectiveAssembler.kt deleted file mode 100644 index a431df6ae2..0000000000 --- a/support/arara/source/src/main/kotlin/org/islandoftex/arara/ruleset/DirectiveAssembler.kt +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package org.islandoftex.arara.ruleset - -/** - * Implements a directive assembler in order to help build a directive from a - * list of strings. - * - * @author Island of TeX - * @version 5.0 - * @since 4.0 - */ -class DirectiveAssembler { - // this variable holds a list of - // line numbers indicating which - // lines composed the resulting - // potential directive - private val lineNumbers = mutableListOf() - - // this variable holds the textual - // representation of the directive - private var text: String = "" - - /** - * Checks if an append operation is allowed. - * @return A boolean value indicating if an append operation is allowed. - */ - val isAppendAllowed: Boolean - get() = lineNumbers.isNotEmpty() - - /** - * Adds a line number to the assembler. - * @param line An integer representing the line number. - */ - fun addLineNumber(line: Int) = lineNumbers.add(line) - - /** - * Appends the provided line to the assembler text. - * @param line The provided line. - */ - fun appendLine(line: String) { - text = text + " " + line.trim() - } - - /** - * Gets the list of line numbers. - * @return The list of line numbers. - */ - fun getLineNumbers(): List = lineNumbers - - /** - * Gets the text. - * @return The assembler text, properly trimmed. - */ - fun getText(): String = text.trim() -} -- cgit v1.2.3