| 1 | package org.farng.mp3.filename; |
| 2 | |
| 3 | /** |
| 4 | * This class is a delimiter which remains a part of the token, located at the start. |
| 5 | * |
| 6 | * @author Eric Farng |
| 7 | * @version $Revision: 1.2 $ |
| 8 | */ |
| 9 | public class FilenameStartWordDelimiter extends FilenameDelimiter { |
| 10 | |
| 11 | /** |
| 12 | * Creates a new FilenameStartWordDelimiter object. |
| 13 | */ |
| 14 | public FilenameStartWordDelimiter() { |
| 15 | super(); |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Creates a new FilenameStartWordDelimiter object. |
| 20 | */ |
| 21 | public FilenameStartWordDelimiter(final FilenameStartWordDelimiter delimiter) { |
| 22 | super(delimiter); |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Reconstruct the filename that is represented by this composite. |
| 27 | * |
| 28 | * @return the filename that is represented by this composite. |
| 29 | */ |
| 30 | public String composeFilename() { |
| 31 | final StringBuffer stringBuffer = new StringBuffer(128); |
| 32 | if (getBeforeComposite() != null) { |
| 33 | stringBuffer.append(getBeforeComposite().composeFilename()); |
| 34 | stringBuffer.append(' '); |
| 35 | } |
| 36 | if (getAfterComposite() != null) { |
| 37 | stringBuffer.append(getAfterComposite().composeFilename()); |
| 38 | } |
| 39 | return stringBuffer.toString().trim(); |
| 40 | } |
| 41 | } |