| 1 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // Copyright (c) 2018 Saxonica Limited. |
| 3 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. |
| 4 | // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. |
| 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 7 | |
| 8 | package net.sf.saxon.tree.tiny; |
| 9 | |
| 10 | /** |
| 11 | * Defines a CharSequence to which characters can be appended |
| 12 | */ |
| 13 | public interface AppendableCharSequence extends CharSequence { |
| 14 | |
| 15 | /** |
| 16 | * Append characters to this CharSequence |
| 17 | * |
| 18 | * @param chars the characters to be appended |
| 19 | */ |
| 20 | void append(CharSequence chars); |
| 21 | |
| 22 | /** |
| 23 | * Set the length. If this exceeds the current length, this method is a no-op. |
| 24 | * If this is less than the current length, characters beyond the specified point |
| 25 | * are deleted. |
| 26 | * |
| 27 | * @param length the new length |
| 28 | */ |
| 29 | |
| 30 | void setLength(int length); |
| 31 | } |