| | 1 | | namespace MoreStructures.SuffixStructures.Builders; |
| | 2 | |
|
| | 3 | | /// <summary> |
| | 4 | | /// Extension methods for all <see cref="IBuilder{TEdge, TNode}"/> concretions. |
| | 5 | | /// </summary> |
| | 6 | | public static class BuilderExtensions |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// <inheritdoc cref="IBuilder{TEdge, TNode}.BuildTree(TextWithTerminator[])"/> |
| | 10 | | /// Text is provided as a plain string. |
| | 11 | | /// </summary> |
| | 12 | | /// <param name="builder"> |
| | 13 | | /// The builder to be used, to build the structure. |
| | 14 | | /// </param> |
| | 15 | | /// <param name="text"> |
| | 16 | | /// The text to build the structure of, without any terminator (automatically added). |
| | 17 | | /// </param> |
| | 18 | | /// <returns> |
| | 19 | | /// <inheritdoc cref="IBuilder{TEdge, TNode}.BuildTree(TextWithTerminator[])"/> |
| | 20 | | /// </returns> |
| | 21 | | public static TNode BuildTree<TEdge, TNode>( |
| | 22 | | this IBuilder<TEdge, TNode> builder, |
| | 23 | | string text) |
| | 24 | | where TEdge : ISuffixStructureEdge<TEdge, TNode> |
| | 25 | | where TNode : ISuffixStructureNode<TEdge, TNode> => |
| 27 | 26 | | builder.BuildTree(new TextWithTerminator(text)); |
| | 27 | | } |