| 1 | |
package org.webslinger.ext.wiki.parser; |
| 2 | |
|
| 3 | |
public class WikiNewline extends SimpleNode implements InlineNode { |
| 4 | |
protected int count; |
| 5 | |
|
| 6 | |
public WikiNewline(int id) { |
| 7 | 0 | super(id); |
| 8 | 0 | } |
| 9 | |
|
| 10 | |
public WikiNewline(Wiki p, int id) { |
| 11 | 33 | super(p, id); |
| 12 | 33 | } |
| 13 | |
|
| 14 | |
public int getCount() { |
| 15 | 61 | return count; |
| 16 | |
} |
| 17 | |
|
| 18 | |
public void setCount(int count) { |
| 19 | 38 | this.count = count; |
| 20 | 38 | } |
| 21 | |
|
| 22 | |
public WikiText convertToText() { |
| 23 | 0 | WikiText text = new WikiText(parser, WikiTreeConstants.JJTTEXT); |
| 24 | 0 | text.firstToken = getFirstToken(); |
| 25 | 0 | text.setLastToken(getLastToken()); |
| 26 | 0 | text.setText(" "); |
| 27 | 0 | return text; |
| 28 | |
} |
| 29 | |
|
| 30 | |
public Object jjtAccept(WikiVisitor visitor, Object data) { |
| 31 | 54 | return visitor.visit(this, data); |
| 32 | |
} |
| 33 | |
|
| 34 | |
public String toString() { |
| 35 | 0 | return super.toString() + '(' + getCount() + ')'; |
| 36 | |
} |
| 37 | |
} |