public class VersionMapper
extends java.lang.Object
implements org.apache.tools.ant.util.FileNameMapper, java.util.Comparator<java.lang.String>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
to |
private java.util.List<java.lang.String> |
versions |
| Constructor and Description |
|---|
VersionMapper() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.lang.String s1,
java.lang.String s2) |
java.lang.String[] |
mapFileName(java.lang.String sourceFileName) |
void |
setFrom(java.lang.String from)
Set the versions identifiers that this mapper can remove from filenames.
|
void |
setTo(java.lang.String to)
By default, only filename is changed, but if this attribute is set to
flatten, directory is removed. |
private java.util.List<java.lang.String> versions
private java.lang.String to
public java.lang.String[] mapFileName(java.lang.String sourceFileName)
mapFileName in interface org.apache.tools.ant.util.FileNameMapperpublic void setFrom(java.lang.String from)
versionsId property value.setFrom in interface org.apache.tools.ant.util.FileNameMapperfrom - The string from which we set.public void setTo(java.lang.String to)
flatten, directory is removed.setTo in interface org.apache.tools.ant.util.FileNameMapperto - topublic int compare(java.lang.String s1,
java.lang.String s2)
compare in interface java.util.Comparator<java.lang.String>